hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alessandro Manzoni <manzoni.alessand...@gmail.com>
Subject Re: 400 bad request POSTing to Tomcat 7.0.42
Date Thu, 26 Feb 2015 18:33:03 GMT
Il 26.02.2015 17.22, Brett Ryan ha scritto:
> I thought Oleg pointed this out already.
>
> If you build up a byte array for your request that byte array must fully occupy local
memory, streaming this will both send data to the host as its constructed directly from the
marshaller which is not only more efficient but will rule out any issue resulted by an incorrectly
formed in memory representation of your payload. Who knows, maybe you have a byte array overflow
thats not apparent, which is kinda what I'm suspecting is going on here since your issue only
arrises once the payload reaches a certain size.
I followed Oleg suggestions.
First I logged both wire an header.
Inside the log there's nothing abnormal, the posted xml is not 
truncated, tomcat keep reply 400.
Then I changed from StringEntity to ByteArrayEntity, and arranged 
content-type with encoding utf-8. This night the customer will change 
the jar, tomorrow morning I'll see.
My thought do was some array overflow, but I think that it's not local, 
I mean not inside HTTPClient. In other words I don't know whether 
there's some buffers in HTTPClient or not. Further more, I don't know 
how to adjust ipotetical buffers.


>
> Sent from my iPhone
>
>> On 26 Feb 2015, at 23:28, Alessandro Manzoni <manzoni.alessandro4@gmail.com>
wrote:
>>
>> What I would like to understand, is why an InputStreamEntity would be better than
a StringEntity.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
>


---------------------------------------------------------------------
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