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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to