curl-library
libcurl : HTTP request Header
Date: Thu, 11 Sep 2008 16:38:37 +0530
Hi,
I have disabled sending "Expect: header" in the client program, just to be
in compliant with RFC.
Thanks.
------------------------------
Message: 4
Date: Sun, 7 Sep 2008 23:37:59 +0200 (CEST)
From: Daniel Stenberg <daniel_at_haxx.se>
Subject: Re: libcurl : HTTP request Header
To: libcurl development <curl-library_at_cool.haxx.se>
Message-ID: <alpine.LRH.1.10.0809072334360.29303_at_yvahk3.pbagnpgbe.fr>
Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII
On Sat, 6 Sep 2008, Sandeep Kale wrote:
> Expect: 100-continue
>
> From where should "Expect: 100-continue" be going with the request header?
> and why ?.
>From client to server. And because it allows the client to abort the
request
sooner in cases when the server responds with an error.
> Reason for asking this is, I have seen below line in RFC 2068:
HTTP 1.1 is RFC2616...
> An HTTP/1.1 (or later) server that receives a request from a HTTP/1.0 (or
> earlier) client MUST NOT transmit the 100 (continue) response; it SHOULD
> either wait for the request to be completed normally (thus avoiding an
> interrupted request) or close the connection prematurely.
libcurl is not a HTTP 1.0 client, at least not by default.
> And I am getting response with below Response header,
> < HTTP/1.1 100 Continue
> < HTTP/1.1 200 OK
So your server does respond fine.
> I am getting proper response back but it taking a more time than expected
> which cannot be compromised.
Then I'd advice you to either: A) fix your server or B) disable libcurl's
sending of the Expect: header or C) both! ;-)
-- / daniel.haxx.seReceived on 2008-09-11