RE: [PEAR-CVS] cvs: pear /Net_URL URL.php
| From: | Richard Heyes | Date: | Sun, 29 Sep 2002 22:57:50 +0000 |
| Subject: | RE: [PEAR-CVS] cvs: pear /Net_URL URL.php | ||
| References: | 1 | Groups: | php.pear.cvs |
| Request: | Send a blank email to pear-cvs+get-6759@lists.php.net to get a copy of this message | ||
> > I can't seem to reproduce any error with the URL you supplied
> > before the patch is applied.
>
> That particular url returns data irregardless, so you do not get an
> error, but depending on the query string of a get method
> request, html
> or wsdl is returned, a very important distinction. The issue starts
> with the use of parse_str, which does not create any result of
> query_string == 'wsdl', and continues with the expectation that query
> string data is an array.
My php seems to be different in this respect (4.2.3):
[richard@heyes-01 richard]$ php -qa
Interactive mode enabled
<?
parse_str('wsdl', $foo);
print_r($foo);
Array
(
[wsdl] =>
)
> However, my patch does not go far enough in
> fixing this issue. The query string 'xxx&yyy=2&zzz' would fail,
> resulting in a query string in the request being 'yyy=2'.
Same again:
parse_str('xxx&yyy=2&zzz', $foo);
print_r($foo);
Array
(
[xxx] =>
[yyy] => 2
[zzz] =>
)
Where I do see a bug is if you use the url you supplied with
HTTP_Request
it will use Net_URL to generate a URL and add an = to the end of the
query string
making ...?wsdl= which causes the page to fail.
--
Richard Heyes
V-webmail - http://www.v-webmail.co.uk