curl-library
Re: Content-Length Question
From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 17 Apr 2006 22:29:55 +0200 (CEST)
Date: Mon, 17 Apr 2006 22:29:55 +0200 (CEST)
On Mon, 17 Apr 2006, Jim Birkenseer wrote:
> I have written the code below, and it looks like the Content-Length is being
> sent out set to zero. I think the Content-Length should be 4. Why is it
> being sent out with a zero length?
...
> curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "test");
> curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, 4);
...
> * About to connect() to xxx.yyy.com port 80
> * Trying ##.##.##.##... * connected
> * Connected to xxx.yyy.com (##.##.##.##) port 80
>> POST /aaaa/bbbbb.php HTTP/1.0
> Host: xxx.yyy.com
> Accept: */*
> Content-Length: 0
> Content-Type: application/x-www-form-urlencoded
I can only agree with you. It looks weird. What libcurl version on what
platform?
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.htmlReceived on 2006-04-17