The body method of org.apache.http.client.fluent.Request is broken. This breaks 
HTTP POSTs via the static Request.Post factory method. I noticed this in the 
released 4.3.3 version.

The change happened in the following revisions:
http://svn.apache.org/viewvc?view=revision&revision=r1568975
http://svn.apache.org/viewvc?view=revision&revision=r1568979

Or on github.com:
https://github.com/apache/httpclient/commit/34675f33d70c012aa0762b93141f3ef4f388220e

Or you can use this search to find the changes:
http://marc.info/?l=httpcomponents-commits&w=2&r=1&s=this.request+%3D+new+InternalHttpRequest%28m&q=b

The body method only only works when the Request object’s request member is an 
instance of HttpEntityEnclosingRequest. However after the change above, this 
can never happen. 

It appears that refactoring done in the above revision above did not follow 
through to the POST case.

(It seems this project doesn’t use unit tests. I’m not dogmatic or anything, 
but in this case a unit test exercising each of the Request factory methods 
would have caught this.)


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to