hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivan Vaskevych <ivan.vaskev...@gmail.com>
Subject Re: HTTP specification problem: DefaultResponseParser
Date Sat, 21 Apr 2012 18:32:02 GMT
Thanks mate!

Yeah, I already overridden the parseStatus and it works for me. I'm just
curious, why browsers are ok with no status.
Would be a good idea to implement this, at least through some conf
parameter.

Cya and thanks for HC!

 Ivan

On Sat, Apr 21, 2012 at 9:10 PM, Oleg Kalnichevski <olegk@apache.org> wrote:

> On Sat, 2012-04-21 at 17:00 +0300, Ivan Vaskevych wrote:
> > Hi folks,
> >
> >
> > httpclient: 4.1.3
> > httpcore: 4.1.4
> >
> > I get a response from the http server with empty status, and get the
> > ProtocolException from HC. The stack trace is below.
> > The site is https. Browsers (IE, Firefox) open the page successfully.
> > Checked with Fiddler, no status in the first line indeed, just
> "HTTP/1.1",
> > then goes LF-CR and "Date:...."
> >
> > The research shows that omitted status code in the response from the
> server
> > means it's 200 OK (http://www.ietf.org/rfc/rfc3875, p.23).
> > Can you please check this?
> >
> > Thanks.
> >
>
> Hi Ivan
>
> As far as I know the official document that specifies the HTTP protocol
> is still RFC 2616 [1]. The protocol specification is quite clear as to
> what constitutes a valid HTTP status line (see section 6.1)
>
> This, however, does not prevent you from using a custom, more lenient
> response parser, as described here [2]
>
> Hope this helps
>
> Oleg
>
> [1] http://www.faqs.org/rfcs/rfc2616.html
> [2]
>
> http://hc.apache.org/httpcomponents-client-ga/tutorial/html/advanced.html#d5e1341
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
> For additional commands, e-mail: dev-help@hc.apache.org
>
>


-- 
Best Regards,
 Ivan

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message