hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roland Weber <ossf...@dubioso.net>
Subject Re: HTTP Response contains headers last
Date Fri, 28 Sep 2007 05:57:20 GMT
Hi Chris,

> Good point!  I'll ask the folks who own the API that I'm accessing to
> move the record count and other API-specific status information to the
> HTTP response footers.  That seems like a reasonable request.  What do
> you think my chances are? ;)

Whoever had that idea in the first place has not the
least clue about protocol design... it's like arguing
architecture with someone who's understanding of a
house is "four walls and a roof":
- Eh, Sir... the roof goes on top.
- Says who? I need protection against creeping cold
  on the floor, so I put the roof at the bottom. Ha!

I guess your best chances are to suggest that the record count is
not put into headers or trailers, but added as the last line of
the message body. There, the application can parse it out.
Trailers are non-trivial to implement, and your folks seem to
use a hand-crafted implementation... I cannot imagine that any
standard HTTP implementation would even allow to send the body
before the entity.

If you can't convince them, the best way to make it work is
still HttpClient. You can install a custom socket factory. And
in your custom socket implementation, you can just buffer the
whole response and then deliver it to the caller in the correct
order: response line, headers, empty line, entity.

good luck,
  Roland

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


Mime
View raw message