hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brett Ryan <brett.r...@gmail.com>
Subject Re: 400 bad request POSTing to Tomcat 7.0.42
Date Tue, 03 Mar 2015 08:36:15 GMT

> What confused me, is that I thought that tomcat should honor the encoding set inside
xml, while it just use content-type encoding or its default one instead.

Thats the correct behaviour. Your servlet container may choose to inspect the POST data but
there is no requirement for it to, thats up to you to implement a filter as mentioned earlier.
What if your XML was malformed, what do you think it should do? The content could be anything
for all it cares. What would your processor do if the header of the XML said the encoding
was 8859-1, but the actual encoding was UCS-2? You wouldn't even be able to read the header
reliably, you would have to perform a series of rereads to get the right encoding.
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Mime
View raw message