Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.4.4

Bug #131 bug when url is /
Submitted: 2003-10-20 20:39 UTC
From: leslie at britbus dot org Assigned: avb
Status: Closed Package: HTTP_Request
PHP Version: Irrelevant OS: Windows XP Professional
Roadmaps: (Not assigned)    
Subscription  


 [2003-10-20 20:39 UTC] leslie at britbus dot org
Description: ------------ if the request url is just in the form of http://example.com, and doesn't have a trailing slash, the output is HTTP 400 Bad Request. I checked the actual request, and it printed as this: GET HTTP/1.1 User-Agent: PEAR HTTP_Request class ( http://pear.php.net/ ) Content-Type: application/x-www-form-urlencoded Connection: close Host: pear.php.net Accept-Encoding: gzip Reproduce code: --------------- $req = &new HTTP_Request('http://www.php.net/'); $req->setMethod(HTTP_REQUEST_METHOD_GET); $req->setURL('http://pear.php.net'); $req->clearPostData(); $req->sendRequest(); //echo $req->_buildRequest(); $response2 = $req->getResponseBody(); echo $response2; Expected result: ---------------- the pear.php.net website to be printed Actual result: -------------- a 400 Bad Request error is produced

Comments

 [2003-10-24 11:18 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!