]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Removed some lighttpd-specific code that messed up Unicode parameters
authorMikael Nordfeldth <mmn@hethane.se>
Fri, 4 Jul 2014 17:16:23 +0000 (19:16 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Fri, 4 Jul 2014 17:16:23 +0000 (19:16 +0200)
index.php

index 1d0aabb8bb375ea0592ba138e2b3a0ca72a9e5c7..f258a52397541f9dc22622fc238474417afef01e 100644 (file)
--- 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.