cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: libcurl : HTTP request Header

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sun, 7 Sep 2008 23:37:59 +0200 (CEST)

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.se
Received on 2008-09-07