]> granicus.if.org Git - php/commitdiff
MFH: Fixed bug #24560 (parse_url() incorrectly handling certain file://
authorIlia Alshanetsky <iliaa@php.net>
Mon, 21 Jul 2003 13:37:10 +0000 (13:37 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Mon, 21 Jul 2003 13:37:10 +0000 (13:37 +0000)
based schemas).

NEWS
ext/standard/tests/strings/url_t.phpt
ext/standard/url.c

diff --git a/NEWS b/NEWS
index eeb90aaf0db5c6288ddf3254fb77e6e5c8687d2a..8a345747b7207d21755f6d38e34b30cc45c76825 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -12,6 +12,8 @@ PHP 4                                                                      NEWS
   is used for background color. (Pierre-Alain Joye)
 - Fixed bug #24640 (var_export and var_dump can't output large float). (Marcus)
 - Fixed bug #24573 (debug_backtrace() crashes if $this set to null). (Jani)
+- Fixed bug #24560 (parse_url() incorrectly handling certain file:// based 
+  schemas). Ilia
 - Fixed bug #24537 (apache2 compile misses some include directories). (Jani)
 - Fixed bug #24519 (aggregate_methods_by_list() does not increment refcount).
 - Fixed bug #24313 (file_exist() warning on non-existent files when
index 29ee7fb48e6acc76cdd8cc969194fdb6839ca636..f3bd83819c70e59e6204a880a253b3931b3957a3 100644 (file)
@@ -625,11 +625,13 @@ array(2) {
   ["path"]=>
   string(13) "/path/to/file"
 }
-array(2) {
+array(3) {
   ["scheme"]=>
   string(4) "file"
+  ["host"]=>
+  string(4) "path"
   ["path"]=>
-  string(12) "path/to/file"
+  string(8) "/to/file"
 }
 array(2) {
   ["scheme"]=>
index 99a6c5df60839633e9bfb2e9aa5b650f5d7b608c..3490981038f789fc1f198fd75591753e84bcec74 100644 (file)
@@ -125,7 +125,9 @@ PHPAPI php_url *php_url_parse(char *str)
                        if (*(e+2) == '/') {
                                s = e + 3;
                                if (!strncasecmp("file", ret->scheme, sizeof("file"))) {
-                                       goto nohost;
+                                       if (*(e + 3) == '/') {
+                                               goto nohost;
+                                       }
                                }
                        } else {
                                s = e + 1;