cvs: php4 /ext/standard url.c /ext/standard/tests/strings url_t.phpt

From: Date: Thu, 14 Nov 2002 13:40:16 +0000
Subject: cvs: php4 /ext/standard url.c /ext/standard/tests/strings url_t.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-16133@lists.php.net to get a copy of this message
iliaa Thu Nov 14 08:40:16 2002 EDT Modified files: /php4/ext/standard/tests/strings url_t.phpt /php4/ext/standard url.c Log: Fixed bug #20420 and added partial urls to the test of the function. Index: php4/ext/standard/tests/strings/url_t.phpt diff -u php4/ext/standard/tests/strings/url_t.phpt:1.3 php4/ext/standard/tests/strings/url_t.phpt:1.4 --- php4/ext/standard/tests/strings/url_t.phpt:1.3 Thu Nov 7 10:46:34 2002 +++ php4/ext/standard/tests/strings/url_t.phpt Thu Nov 14 08:40:13 2002 @@ -61,7 +61,9 @@ 'zlib:filename.txt', 'zlib:/path/to/my/file/file.txt', 'foo://foo@bar', -'mailto:me@mydomain.com' +'mailto:me@mydomain.com', +'/foo.php?a=b&c=d', +'foo.php?a=b&c=d' ); foreach ($sample_urls as $url) { @@ -181,7 +183,7 @@ } array(1) { ["path"]=> - string(13) "www.php.net/?" + string(12) "www.php.net/" } array(3) { ["host"]=> @@ -586,4 +588,16 @@ string(6) "mailto" ["path"]=> string(15) "me@mydomain.com" +} +array(2) { + ["path"]=> + string(8) "/foo.php" + ["query"]=> + string(7) "a=b&c=d" +} +array(2) { + ["path"]=> + string(7) "foo.php" + ["query"]=> + string(7) "a=b&c=d" } Index: php4/ext/standard/url.c diff -u php4/ext/standard/url.c:1.58 php4/ext/standard/url.c:1.59 --- php4/ext/standard/url.c:1.58 Thu Nov 7 10:41:32 2002 +++ php4/ext/standard/url.c Thu Nov 14 08:40:14 2002 @@ -15,7 +15,7 @@ | Author: Jim Winstead <jimw@php.net> | +----------------------------------------------------------------------+ */ -/* $Id: url.c,v 1.58 2002/11/07 15:41:32 iliaa Exp $ */ +/* $Id: url.c,v 1.59 2002/11/14 13:40:14 iliaa Exp $ */ #include <stdlib.h> #include <string.h> @@ -153,9 +153,8 @@ } } else { just_path: - ret->path = estrndup(s, length); - php_replace_controlchars(ret->path); - return ret; + ue = s + length; + goto nohost; } if (!(e = strchr(s, '/'))) {

« previous php.cvs (#16133) next »