hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <o.kalnichev...@dplanet.ch>
Subject Re: Buffered output to socket
Date Mon, 21 Apr 2003 14:23:47 GMT
What may be the reasons for output buffering other than working around
some weird timeout settings? 

The HttpConnection class can be easily tweaked to perform output
buffering. However, I (personally) see no compelling reasons for folding
such modifications into the main code tree. 

The problem can be cleanly solved by turning HttpConnection into an
interface, which would allow for extending standard HTTP connection
behavior without having to fork HttpClient. Such a radical change cannot
take place before 2.0 release, though. It may take a while until we get
there. If you are not willing (or can't) simply change your HTTP server
settings to something saner, you'll have to maintain your own HttpClient

Folks, any different opinions on the issue? 


On Mon, 2003-04-21 at 14:57, Slavik Markovich wrote:
> Hi all,
> This is probably a known issue (but I haven't found the answer for it yet).
> I'm using httpclient to post data to a remote server but as far as I can see (using ethereal)
the client is writing every line to the wire without buffering.
> After examining the code, I can see that the HttpConnection class is using the output
stream received from the socket directly.
> Is there a reason for the direct writing?
> This is a problem for me 'cause the remote server sets a very low timeout and returns
a bad request response after receiving the request line (without any other header line or
request body).
> Can I easily add a buffered behavior to the http client?
> 10x
> ----------------------------------------------------------------------------------------------------------------
> This message contains information that may be confidential or privileged.
> If you are not the intended recipient, you may not use, copy or disclose
> to anyone any of the information in this message. If you have received
> this message and are not the intended recipient, kindly notify the sender
> and delete this message from your computer.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org

View raw message