I'm implementing a proxy server and I am using the example code to send a
http request and receive a http response. but I found that I am losing data
in the HttpEntity from the response.getEntity(), here is the situation:

int len1 = EntityUtils.toByteArray(response.getEntity()).lenth();
int len2 = response.getEntity().getContentLength();

and I found that len1<len2 and when I send out the response.getEntity() to
the client, I am losing data since the data send out in the 2nd connection
to the client browser is of len1 length.

I am using exactly the same code as the example code of HttpComponent,
what's wrong with my situation?

Best Regards,

-- 
马俊
Jun Ma
Shanghai Jiao Tong University
Mobile: +86 13918713028
Email: [email protected]

Reply via email to