You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by Adrian Sutton <ad...@ephox.com> on 2003/02/28 00:14:59 UTC

RE: RFE: Method to return an InputStream that includes both HTTP headers and HTTP body

To achieve this, wouldn't HttpClient have to reconstruct the headers in a
fact input stream just like Jesus was originally doing?

I mean, we *have* to read the headers to handle redirects so we can't just
return the original stream.  It seems like this may as well be done outside
of HttpClient, but maybe I'm missing something.  Definitely a good addition
to the HttpClient utility code page though.

Adrian Sutton, Software Engineer
Ephox Corporation
www.ephox.com


-----Original Message-----
From: Jesus M. Salvo Jr. [mailto:jesus.salvo@migasia.com]
Sent: Friday, 28 February 2003 9:06 AM
To: Commons HttpClient Project
Subject: Re: RFE: Method to return an InputStream that includes both
HTTP headers and HTTP body



Definitely ... unless of course setFollowRedirect() is set to false.

Ortwin Gl|ck wrote:

> Jesus M. Salvo Jr. wrote:
>
>>
>> At the moment, the HttpMethod interface has a method 
>> getResponseBodyAsStream() that returns an InputStream of the HTTP body.
>> I need a method that returns the _entire_ HTTP response, including 
>> the HTTP headers and body, in a single InputStream.
>
>
>
> I assume in case of redirection, authentication and the like, you only 
> want the stream from the final request.
>
> Odi
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: 
> commons-httpclient-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: 
> commons-httpclient-dev-help@jakarta.apache.org
>
>


-- 
Jesus M. Salvo Jr.
Mobile Internet Group Pty Ltd
(formerly Softgame International Pty Ltd)
M: +61 409 126699
T: +61 2 94604777
F: +61 2 94603677

PGP Public key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xC0BA5348



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