Hello Robert,

> Only handling strict http/1.x will mean that httpclient can not be used
> for many things.

Like cooking coffee :-) It can still be used for what it's meant to
be used: communicating with HTTP.

> For now rabbit has a flag to
> enable/disable strict http. That flag has to be set to false as default.

We whish we could do that as well. But we can't. The HttpClient 3.x
code base is monolithic. We can't disable a "strict" check, we'd have
to add code for tolerance.

> I have not checked if httpclient handles newline issues strict or if is
> forgiving there. Most of the problems I saw with strict http handling
> where with CGI sending \n\n instead of \r\n\r\n.

It is forgiving, see HttpParser.readLine(InputStream, String).
We are also forgiving about spurious newlines at the beginning
of a response, which is necessary for keep-alive with servers
that send an extra newline after the response.

> If I were to try to build a web proxy with httpclient it would not work
> well, so all I can recomend is to at least make it possible to handle
> broken headers similar to how browsers treat them.

We are working on HttpComponents, which introduces a modular design.
When that is ready for prime time, it shouldn't be too hard to plug
in a different header parser that does something useful with non-
header lines. Then one could implement two, one that considers trash
as a trash line and continues to read headers, and one that considers
trash as an indication of a missing empty line after the headers and
finishes header parsing there.

> Has anyone tried to run something like the co-advisor http tests with
> httpclient?
> http://coad.measurement-factory.com/

Not that I know of. We know that the design of HttpClient 3.x is
broken, so why should we run tests for things we wouldn't implement
there anyway? The redesign is our first priority, and it will keep
us very busy for months to come. Once we've got something we feel
comfortable with, we can consider adding features, including fault
tolerance. Thanks a lot for the link - sounds very interesting.
I'll remember it until the time is ripe.

> Just my thoughts, now I need to read through the nio-version to see how
> httpclient handles that, just to compare it to my proxy (which uses full
> nio for all handling).

HttpClient doesn't handle it at all. HttpComponents will, but
NIO support is only just in the making.

cheers,
  Roland

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to