iliaa Fri Oct 18 19:54:58 2002 EDT
Modified files:
/php4/ext/standard url.c
Log:
Added handling for file:/ schema, which does not contain a host.
Index: php4/ext/standard/url.c
diff -u php4/ext/standard/url.c:1.56 php4/ext/standard/url.c:1.57
--- php4/ext/standard/url.c:1.56 Thu Oct 17 09:59:55 2002
+++ php4/ext/standard/url.c Fri Oct 18 19:54:58 2002
@@ -15,7 +15,7 @@
| Author: Jim Winstead <[EMAIL PROTECTED]> |
+----------------------------------------------------------------------+
*/
-/* $Id: url.c,v 1.56 2002/10/17 13:59:55 iliaa Exp $ */
+/* $Id: url.c,v 1.57 2002/10/18 23:54:58 iliaa Exp $ */
#include <stdlib.h>
#include <string.h>
@@ -101,7 +101,10 @@
if (*(e+2) == '/') {
s = e + 3;
} else {
- s = e + 2;
+ s = e + 1;
+ if (!strncasecmp("file", ret->scheme, sizeof("file"))) {
+ goto nohost;
+ }
}
} else if (e) { /* no scheme, look for port */
p = e + 1;
@@ -185,6 +188,8 @@
}
s = e;
+
+ nohost:
if ((p = strchr(s, '?'))) {
pp = strchr(s, '#');
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php