cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: HTTP Post with digest

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 13 Mar 2008 17:42:14 +0100 (CET)

On Thu, 13 Mar 2008, Raf Nulens wrote:

> second example (read-callback)
>
> POST /ws/1/track/ HTTP/1.1
> Host: musicbrainz.org
> Accept: */*
> Content-Length: 0
> Content-Type: application/x-www-form-urlencoded
>
> <xml></xml>HTTP/1.1 401 Authorization Required
> Date: Thu, 13 Mar 2008 13:41:21 GMT

...

> In the second example the data is sent without waiting for the 401
> Authentication Required. Notice content-length 0, but still libcurl is
> sending data.

Right, this I didn't understand previously. Thanks for clarifying.

However, I can't repeat this since my test program that uses a read callback
to send a 10K file gets this:

=> Send header, 134 bytes (0x86)
0000: POST /ws/1/track/ HTTP/1.1
001c: Host: musicbrainz.org
0033: Accept: */*
0040: Content-Length: 0
0053: Content-Type: application/x-www-form-urlencoded
0084:
== Info: HTTP 1.1 or later with persistent connection, pipelining supported
<= Recv header, 37 bytes (0x25)
0000: HTTP/1.1 401 Authorization Required
<= Recv header, 37 bytes (0x25)
0000: Date: Thu, 13 Mar 2008 16:37:07 GMT
<= Recv header, 56 bytes (0x38)

Which would indicate that the bug depends on some timing or similar.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2008-03-13