'mailto:me@mydomain.com',
'/foo.php?a=b&c=d',
'foo.php?a=b&c=d',
-'http://user:passwd@www.example.com:8080?bar=1&boom=0'
+'http://user:passwd@www.example.com:8080?bar=1&boom=0',
+'file:///path/to/file',
+'file://path/to/file',
+'file:/path/to/file'
);
foreach ($sample_urls as $url) {
["query"]=>
string(12) "bar=1&boom=0"
}
+array(2) {
+ ["scheme"]=>
+ string(4) "file"
+ ["path"]=>
+ string(13) "/path/to/file"
+}
+array(2) {
+ ["scheme"]=>
+ string(4) "file"
+ ["path"]=>
+ string(12) "path/to/file"
+}
+array(2) {
+ ["scheme"]=>
+ string(4) "file"
+ ["path"]=>
+ string(13) "/path/to/file"
+}
if (*(e+2) == '/') {
s = e + 3;
+ if (!strncasecmp("file", ret->scheme, sizeof("file"))) {
+ goto nohost;
+ }
} else {
s = e + 1;
if (!strncasecmp("file", ret->scheme, sizeof("file"))) {