File tree Expand file tree Collapse file tree 3 files changed +11
-17
lines changed
Expand file tree Collapse file tree 3 files changed +11
-17
lines changed Original file line number Diff line number Diff line change @@ -177,11 +177,9 @@ protected function checkDomain()
177177 if (self ::$ cachehost !== null ) {
178178 $ host = self ::$ cachehost ;
179179 } else {
180- $ fhost = Request::header ('Host ' );
181- $ host = strstr ($ fhost , ': ' , true );
182- $ host = $ host ? $ host : $ fhost ;
180+ $ host = Request::header ('Host ' );
183181
184- self ::$ cachehost = $ host ;
182+ self ::$ cachehost = $ host ? strtok ( $ host , ' : ' ) : '' ;
185183 }
186184
187185 if ($ host === $ this ->domain ) {
Original file line number Diff line number Diff line change 1616class App
1717{
1818 /** Inphinit framework version */
19- const VERSION = '0.5.9 ' ;
19+ const VERSION = '0.5.10 ' ;
2020
2121 private static $ events = array ();
2222 private static $ configs = array ();
Original file line number Diff line number Diff line change @@ -94,18 +94,14 @@ function UtilsPath()
9494 static $ pathinfo ;
9595
9696 if ($ pathinfo === null ) {
97- $ requri = parse_url ($ _SERVER ['REQUEST_URI ' ], PHP_URL_PATH );
98- $ sname = $ _SERVER ['SCRIPT_NAME ' ];
99-
100- if ($ requri !== $ sname && $ sname !== '/index.php ' ) {
101- $ pathinfo = rtrim (strtr (dirname ($ sname ), '\\' , '/ ' ), '/ ' );
102- $ pathinfo = substr (urldecode ($ requri ), strlen ($ pathinfo ));
103-
104- if ($ pathinfo === false ) {
105- $ pathinfo = '/ ' ;
106- }
107- } else {
108- $ pathinfo = urldecode ($ requri );
97+ $ requri = urldecode (strtok ($ _SERVER ['REQUEST_URI ' ], '? ' ));
98+ $ sname = dirname ($ _SERVER ['SCRIPT_NAME ' ]);
99+
100+ if ($ sname === '\\' || $ sname === '/ ' ) {
101+ $ pathinfo = $ requri ;
102+ } elseif ($ requri !== $ sname ) {
103+ $ pathinfo = rtrim ($ sname , '/ ' );
104+ $ pathinfo = substr ($ requri , strlen ($ pathinfo ));
109105 }
110106 }
111107
You can’t perform that action at this time.
0 commit comments