Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Httpclient not returning entire response

Using HttpClient 4.0, Im having an issue where the response I get from the ResponseHandler is only about half of what the actual page content should be (~61k bytes in the string vs ~125k in the page returned to a browser). I cant seem to find any place where there might be some sort of limit that would limit this. Any ideas?

Update: One other thing I have found is that the size returned by the entity's getContentLength method is -1, whereas it is a normal value for the previous request. The javadoc seems to indicate that means the length is unknown- Any ideas why that might be the case?

Update2: I tried finding a response for a page more than 80KB. Its interesting that maximum length of the response string is always 18210 characters. Any ideas??

like image 963
Jackson Davis Avatar asked Feb 14 '26 18:02

Jackson Davis


1 Answers

This might not be it, but sometimes this can happen if you aren't flushing a stream somewhere.

like image 140
Chris Avatar answered Feb 16 '26 08:02

Chris