HTTP_Client, HTTP_Request or Net_Url problem

From: Date: Tue, 16 May 2006 08:38:00 +0000
Subject: HTTP_Client, HTTP_Request or Net_Url problem
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-42508@lists.php.net to get a copy of this message
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, we've found a case were HTTP_Client causes a bad request in apache: 1) Sent HTTP_Client to e.g. http://server/url/ 2) http://server/url/ has actually a redirect (Location:) to "http://server/otherurl?var=has space" 3) Apache responds with a bad request Usual Browser clients recognize the space and encode it, this doesn't happen with HTTP_Client. Now, HTTP_Client internally uses HTTP_Request which recognizes the Location: and takes the URL "as is" and create a new Net_Url from it (in HTTP_Request::sendRequest() ). Net_Url, as it seems, doesn't do anything special with the url, it just sets it to its own property 'this->url' and that's it. To have our application work we had to apply urlencode() before we sent the Location: over the wire. Now, this is likely possible that this violates the spec, but in this case other Agents can handle this pretty good, so maybe this can done with the PEAR components too? - - Markus -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.1 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFEaY9o1nS0RcInK9ARAqw3AJ0f/zf2l6Ql8o6FOuuEyizbe0Fc/QCeNOSr pHtPy+lO5udqf2ycoGA1xV0= =0Z7F -----END PGP SIGNATURE-----

« previous php.pear.dev (#42508) next »