some changes for lighttpd v0.1.0
authorChristian Weiske <cweiske@cweiske.de>
Fri, 27 Nov 2015 20:52:45 +0000 (21:52 +0100)
committerChristian Weiske <cweiske@cweiske.de>
Fri, 27 Nov 2015 20:52:45 +0000 (21:52 +0100)
src/header.php
www/index.php

index 8122384dcbe6bfa5db56c62a789c2f3056fdb534..772f0fdecdff5b40acb8914fd804fed9d9769a16 100644 (file)
@@ -1,10 +1,9 @@
 <?php
 set_include_path(get_include_path() . PATH_SEPARATOR . __DIR__ . '/../src/');
-$fullUri = $_SERVER['REQUEST_URI'];
-if (isset($_SERVER['REDIRECT_URL'])) {
-    $path    = $_SERVER['REDIRECT_URL'];
-} else {
-    $path = '/';
+$path = $fullUri = urldecode($_SERVER['REQUEST_URI']);//with query string
+$qPos = strpos($fullUri, '?');
+if ($qPos !== false) {
+    $path = substr($fullUri, 0, $qPos);
 }
 $dataDir = __DIR__ . '/../data/';
 $varDir  = realpath(__DIR__ . '/../var') . '/';
index db6f8d8457d2d004122752066f28361497f0474a..02dd4e89bed7ee01b621861f10f9b5fdaed42af3 100644 (file)
@@ -243,7 +243,7 @@ function sendListItems($listItems)
     }
     $xml .= "</ListOfItems>\n";
 
-    header('Content-type: text/xml');
+    header('Content-type: text/xml; charset=iso-8859-1');
     echo $xml;
 }
 ?>