cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: Reg: Expect: option

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sun, 21 Jun 2009 22:57:01 +0200 (CEST)

On Fri, 19 Jun 2009, Savitha Perumal wrote:

> Using POST with HTTP 1.1 implies the use of a "Expect: 100-continue" which
> makes curl to split the requests if the POST data is greater than 1K. I am
> using set CURLOPT_HTTPHEADER to "Expect:" to stop curl from splitting the
> data.

Expect: really implies that they must be "split".

> headersList = curl_slist_append(headersList, "Expect:");
> curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headersList);
>
> But curl still split the posts.
> ....
>
> Content-Length: 1405^M
> Content-Type: application/x-www-form-urlencoded^M
> Expect: 100-continue^M

This looks wrong then, as you're still getting the Expect: header!

> Also, we observed a core drop in the following location.
>
> (gdb) where
> #0 0x212e88f4 in strncasecmp () from /usr/lib32/compat/libc.so.4
> #1 0x21d7e5ea in curl_strnequal () from /usr/local/lib/libcurl.so.4
> #2 0x21d66534 in checkheaders () from /usr/local/lib/libcurl.so.4
> #3 0x21d6854c in Curl_http () from /usr/local/lib/libcurl.so.4
> #4 0x21d74bba in Curl_do () from /usr/local/lib/libcurl.so.4
> #5 0x21d81a84 in multi_runsingle () from /usr/local/lib/libcurl.so.4
> #6 0x21d8212e in curl_multi_perform () from /usr/local/lib/libcurl.so.4

> Environment : Free BSD4,
> Curl : 7.19.4_1

Can you give us a full example repeating such a problem?

-- 
  / daniel.haxx.se
Received on 2009-06-21