hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: Problems with HttpClient
Date Sun, 09 May 2004 16:31:00 GMT
Anoop,

My guess is that some of the methods simply timeout while reading the
response from the server. Unfortunately, HttpClient does not handle this
situation well. Do not use HttpMethodBase#getResponseBody or
HttpMethodBase#getResponseBodyAsString methods. They are plain broken.
Both methods are made to ignore I/O errors and return null instead of
propagating IOException-s to the caller. Whoever designed those methods
did HttpClient a bad service. Use getResponseBodyAsStream and do the
reading from the input stream as you see fit

Cheers,

Oleg


On Fri, 2004-05-07 at 17:01, Anoop Adya wrote:
> Hi
> We have developed a client solution with the help of HttpClient.
> During the trial run we noticed that it works smoothly for clients and
> server within the same domain. However, if i try to use HttpClient over
> multiple domains, I get a NullPointerException as getResponseBody returns
> null.
> Do we need to do something special to handle cross domain requests?
> Note however that the user is in the same domain as the server we try to
> access.
> 
> Any pointers would be greatly appreciated.
> 
> regards, Anoop.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org


Mime
View raw message