Browse Source

make parse_url work correctly for file uri's on windows, such as

file:///c:/somepath/somefile.txt
PEAR_1_4DEV
Shane Caraveo 22 years ago
parent
commit
4505a611ba
  1. 6
      ext/standard/url.c

6
ext/standard/url.c

@ -126,6 +126,12 @@ PHPAPI php_url *php_url_parse(char *str)
s = e + 3;
if (!strncasecmp("file", ret->scheme, sizeof("file"))) {
if (*(e + 3) == '/') {
/* support windows drive letters as in:
file:///c:/somedir/file.txt
*/
if (*(e + 5) == ':') {
s = e + 4;
}
goto nohost;
}
}

Loading…
Cancel
Save