hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kalnichevski, Oleg" <oleg.kalnichev...@bearingpoint.com>
Subject RE: Post Method
Date Thu, 12 Jun 2003 13:34:40 GMT
Manuel,

We have discovered that HttpClient does not properly handle 'x-www-form-urlencoded' encoding.
The problems with POST requests you have been experiencing appear to have been caused by this
bug

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20481

I'll be working on a fix. Stay tuned

Cheers

Oleg

-----Original Message-----
From: Michael Becke [mailto:becke@u.washington.edu]
Sent: Wednesday, June 11, 2003 04:29
To: Commons HttpClient Project
Subject: Re: Post Method


There seems to be quite a bit of discussion regarding this question but 
not too much that seems ultimately definitive.  This one seems to be 
the best:

http://groups.google.com/groups?oi=djq&selm=an_537840002

Essentially the author says that form encoding and URI encoding are two 
unrelated things.  When posting via a form the data should be encoded 
as per (http://www.w3.org/MarkUp/html-spec/html-spec_8.html#SEC8.2.1).  
When building a URI rfc2396 should be used.

If this is correct, which I think it is, PostMethod is incorrectly 
encoding values.  It also seems that query parameters are being 
incorrectly encoded as they should be using x-www-form-urlencoded. My 
guess is that most web servers will accept data encoded either way as 
there is some general confusion regarding this.  My feeling is that 
PostMethod and HttpMethodBase should be changed to conform to the 
x-www-form-urlencoded standard.  What does everyone think?

Mike

On Tuesday, June 10, 2003, at 01:13 PM, Mike Moran wrote:

> Michael Becke wrote:
>> I think there may be a bug here as well.  According to the spec, 
>> space characters should be represented as '+' but URIUtil is encoding 
>> them as '%20'.  I think the resevered character set is perhaps also 
>> incorrect. According to rfc 1738 ";", "/", "?", ":", "@", "=" and "&" 
>> are the reserved chars but URI is also uncluding "+", "$" and ",".  
>> My guess is that most servers translate all hex encoded characters 
>> but it seems that we are not quite to spec.
>
> You may want to double-check this with rfc2396, which updates rfc1738. 
> My interpretation of the '+'/'%20' issue was that both were legal 
> escapings of space, however it may be worth another reading on my > part.
>
> -- 
> Mike Moran
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: 
> commons-httpclient-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: 
> commons-httpclient-dev-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org


Mime
View raw message