iliaa Thu Oct 17 09:59:56 2002 EDT Modified files: /php4/ext/standard url.c Log: Added support for file:/. Thanks to Thies for noticing the problem. Index: php4/ext/standard/url.c diff -u php4/ext/standard/url.c:1.55 php4/ext/standard/url.c:1.56 --- php4/ext/standard/url.c:1.55 Sat Oct 12 12:09:01 2002 +++ php4/ext/standard/url.c Thu Oct 17 09:59:55 2002 @@ -15,7 +15,7 @@ | Author: Jim Winstead <[EMAIL PROTECTED]> | +----------------------------------------------------------------------+ */ -/* $Id: url.c,v 1.55 2002/10/12 16:09:01 iliaa Exp $ */ +/* $Id: url.c,v 1.56 2002/10/17 13:59:55 iliaa Exp $ */ #include <stdlib.h> #include <string.h> @@ -94,10 +94,15 @@ ue = s + length; /* parse scheme */ - if ((e = strchr(s, ':')) && *(e+1) == '/' && *(e+2) == '/' && (e-s)) { + if ((e = strchr(s, ':')) && *(e+1) == '/' && (e-s)) { ret->scheme = estrndup(s, (e-s)); php_replace_controlchars(ret->scheme); - s = e + 3; + + if (*(e+2) == '/') { + s = e + 3; + } else { + s = e + 2; + } } else if (e) { /* no scheme, look for port */ p = e + 1; pp = p;
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php