You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Rezaei, Mohammad A." <mo...@gs.com> on 2005/02/23 17:31:43 UTC
Delaying headers when Expect-Continue not set
In HttpMethodBase, the http headers are flushed before the content is
written. Is there any reason for this other than Expect-Continue handling?
The reason I ask is that for small POST requests, this generates twice as
many network packets as necessary. If this is just for Expect-Continue
handling, would it be possible to move the flush inside the handling code?
That is,
// make sure the status line and headers have been sent
conn.flushRequestOutputStream();
Moves into the if statement:
if ((expectvalue != null)
&& (expectvalue.compareToIgnoreCase("100-continue") == 0)) {
if (ver.greaterEquals(HttpVersion.HTTP_1_1)) {
Thanks
Moh
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-dev-help@jakarta.apache.org
Re: Delaying headers when Expect-Continue not set
Posted by Oleg Kalnichevski <ol...@apache.org>.
Hi Mohammad,
This issue has been addressed just recently post 3.0rc1:
http://issues.apache.org/bugzilla/show_bug.cgi?id=33468
Cheers,
Oleg
On Wed, 2005-02-23 at 11:31 -0500, Rezaei, Mohammad A. wrote:
> In HttpMethodBase, the http headers are flushed before the content is
> written. Is there any reason for this other than Expect-Continue handling?
> The reason I ask is that for small POST requests, this generates twice as
> many network packets as necessary. If this is just for Expect-Continue
> handling, would it be possible to move the flush inside the handling code?
> That is,
>
> // make sure the status line and headers have been sent
> conn.flushRequestOutputStream();
>
> Moves into the if statement:
>
> if ((expectvalue != null)
> && (expectvalue.compareToIgnoreCase("100-continue") == 0)) {
> if (ver.greaterEquals(HttpVersion.HTTP_1_1)) {
>
> Thanks
> Moh
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: httpclient-dev-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-dev-help@jakarta.apache.org