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

Bug #1867 method addRawPostData stopped working when upgrading 1.2.1 to 1.2.2
Submitted: 2004-07-14 08:22 UTC
From: yavo Assigned:
Status: Bogus Package: HTTP_Request
PHP Version: 4.3.2 OS: Redhat Linux ES3
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 11 + 19 = ?

 
 [2004-07-14 08:22 UTC] yavo
Description: ------------ The method addRawPostData stopped working as intended after I upgraded to the lates version of HTTP_request. It works as expected in version 1.2.1 Reproduce code: --------------- $req = new HTTP_Request('http://example.com/'); $req->addRawPostData('Some Data'); Expected result: ---------------- Post data to be added to the request Actual result: -------------- Post data was missing from the request

Comments

 [2004-07-14 14:24 UTC] avb
This is not a bug. Prior to 1.2.2 HTTP_Request erroneously sent POST data on non-POST requests (see #1333). The error is in your code, you should change request method to POST: $req->setMethod(HTTP_REQUEST_METHOD_POST);
 [2004-07-14 14:58 UTC] yavo
After checking my code uses the following syntax $req = new HTTP_Request($url, array('method'=>'post')); quicly looking through the HTTP_Request source it appears that post must be in upped case (POST). Would be nice if this was not case sensitive
 [2004-07-14 15:42 UTC] avb
RFC 2616 [1] states: 5.1.1 Method The Method token indicates the method to be performed on the resource identified by the Request-URI. The method is case-sensitive. [1] http://www.faqs.org/rfcs/rfc2616.html