From: Mikael Nordfeldth <mmn@hethane.se>
Date: Fri, 4 Jul 2014 17:16:23 +0000 (+0200)
Subject: Removed some lighttpd-specific code that messed up Unicode parameters
X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f42f7a1c854a54fc9b1972067f7e2e5fc2f11f4b;p=quix0rs-gnu-social.git

Removed some lighttpd-specific code that messed up Unicode parameters
---

diff --git a/index.php b/index.php
index 1d0aabb8bb..f258a52397 100644
--- a/index.php
+++ b/index.php
@@ -216,24 +216,6 @@ function isLoginAction($action)
 
 function main()
 {
-    // fake HTTP redirects using lighttpd's 404 redirects
-    if (strpos($_SERVER['SERVER_SOFTWARE'], 'lighttpd') !== false) {
-        $_lighty_url = $_SERVER['REQUEST_URI'];
-        $_lighty_url = @parse_url($_lighty_url);
-
-        if ($_lighty_url['path'] != '/index.php' && $_lighty_url['path'] != '/') {
-            $_lighty_path = preg_replace('/^'.preg_quote(common_config('site', 'path')).'\//', '', substr($_lighty_url['path'], 1));
-            $_SERVER['QUERY_STRING'] = 'p='.$_lighty_path;
-            if (isset($_lighty_url['query']) && $_lighty_url['query'] != '') {
-                $_SERVER['QUERY_STRING'] .= '&'.$_lighty_url['query'];
-                parse_str($_lighty_url['query'], $_lighty_query);
-                foreach ($_lighty_query as $key => $val) {
-                    $_GET[$key] = $_REQUEST[$key] = $val;
-                }
-            }
-            $_GET['p'] = $_REQUEST['p'] = $_lighty_path;
-        }
-    }
     $_SERVER['REDIRECT_URL'] = preg_replace("/\?.+$/", "", $_SERVER['REQUEST_URI']);
 
     // quick check for fancy URL auto-detection support in installer.