cvs: php4 /ext/standard url.c

From: Date: Fri, 18 Oct 2002 23:54:58 +0000
Subject: cvs: php4 /ext/standard url.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-15038@lists.php.net to get a copy of this message
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 <jimw@php.net> | +----------------------------------------------------------------------+ */ -/* $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, '#');

« previous php.cvs (#15038) next »