Sam Berlin wrote:
The constructor for UrlEncodedFormEntity doesn't seem to include the
encoding when setting the contentType. This is in contrast to it's
parent class (StringEntity) that does set the contentType. (The
content-type from StringEntity doesn't stick, though, because it's set
in the constructor & UrlEncodedFormEntity immediately calls
setContentType in its constructor, which overwrites what StringEntity
had done).
I don't know what the correct behavior should be... If I want to
generate a url-encoded list of parameters, encoded in UTF-8, should
that be written into the content-type like it is with a non
url-encoded entity?
Sam
Sam,
URL encoding is a bit of a gray area. For instance, there is basically
no way to specify an encoding for the request URI parameters. I think
the basic convention is that both the client and the server need to
agree on a certain charset, which is usually UTF-8. Anyways, feel free
to tweak the code to include the charset attribute in the content type
header.
Cheers
Oleg
---------------------------------------------------------------------
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]