commit 213c3bf83af4498c39ff73e23bcdedbbe2bf9d16
parent cf4a96d9b37ff3a01257d5b1ea55775a78aaa4fd
Author: Felicitus <felicitus@felicitus.org>
Date: Thu, 22 Sep 2011 03:30:43 +0200
Added Ping Service, modified allowed headers
Diffstat:
2 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/src/de/RaumZeitLabor/PartKeepr/Ping/PingService.php b/src/de/RaumZeitLabor/PartKeepr/Ping/PingService.php
@@ -0,0 +1,21 @@
+<?php
+namespace de\RaumZeitLabor\PartKeepr\Ping;
+use de\RaumZeitLabor\PartKeepr\Service\AnonService;
+
+declare(encoding = 'UTF-8');
+
+use de\RaumZeitLabor\PartKeepr\Service\Service;
+use de\RaumZeitLabor\PartKeepr\PartKeepr;
+
+class PingService extends AnonService {
+ /**
+ * Simple test call to verify if the service layer is reachable.
+ *
+ * This is used for the PartKeeprMobile client to verify if the URL
+ * is entered correctly.
+ */
+ public function ping () {
+ return "pong";
+ }
+
+}+
\ No newline at end of file
diff --git a/src/de/RaumZeitLabor/PartKeepr/Service/ServiceManager.php b/src/de/RaumZeitLabor/PartKeepr/Service/ServiceManager.php
@@ -16,9 +16,7 @@ class ServiceManager {
header("Content-Type: text/html; charset=UTF-8");
header("Cache-Control: no-cache, must-revalidate");
header("Access-Control-Allow-Origin: *");
- header("Access-Control-Allow-Headers: lang");
- header("Access-Control-Allow-Headers: call");
- header("Access-Control-Allow-Headers: service");
+ header("Access-Control-Allow-Headers: lang,call,service");
}
public static function call () {