You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Dominic Hughes <do...@theory.Stanford.EDU> on 2002/05/27 04:30:52 UTC

httpclient: possible HttpClient/PostMethod bug

The attached test program highlights a possible bug in
HttpClient/PostMethod: at some web sites the parameters of a post do not
seem to register correctly.

The test program retrieves an html page from
http://sirius.chinalake.navy.mil using a post method in two different
ways: (1) "by hand", using standard java classes (URLConnection etc), and
(2) using classes HttpClient and PostMethod.  As would be expected, the
page retrieved by (1) is identical to the one obtained by entering the
post parameters by hand at http://sirius.chinalake.navy.mil/satpred/.  
However, (2) returns a garbled page: the post parameters do not seem to
register properly.  Can anybody explain why?

I attached the output of the test program, which prints out a few lines of
the page retrieved by (1) and the corresponding lines of the page
retrieved by (2) --- clearly different.

Is this really a bug in HttpClient/PostMethod, or does the test program
employ HttpClient and PostMethod incorrectly?

Feedback welcome!

Dominic Hughes and Julien Basch
http://boole.stanford.edu/~dominic