hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ken Krugler <kkrugler_li...@transpac.com>
Subject Re: When returning page is 404 no InputStream can be read
Date Wed, 27 Jan 2010 19:41:53 GMT

On Jan 27, 2010, at 3:01am, cj_tomekk wrote:

>
> Hello,
> I have such a problem that I recieve HTTP content from a specified  
> address
> after GET/POST methods.
> Tipically:
> HttpResponse hresponse = httpclient.execute(hrequest);
>
> Getting the entity:
> HttpEntity entity = hresponse.getEntity();
>
> When return code is for example 200 it enables me to get the stream  
> and do
> sth with it.
>
> When return code if 404 no data can be retrieved. Normally doing  
> action by
> browser gives a specific 404 page.

 From my experience w/HttpClient (4.0), sometimes I get a response  
entity w/a 404, and sometimes I don't.

The browser might be synthesizing something (depending on the browser)  
for empty 404 pages.

What happens when you do a GET request to that server via curl (with  
the -v option)?

-- Ken

--------------------------------------------
Ken Krugler
+1 530-210-6378
http://bixolabs.com
e l a s t i c   w e b   m i n i n g





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