curl-library
RE: PUT of empty file with multi-pass authentication fails
Date: Thu, 5 Apr 2012 23:50:57 +0200 (CEST)
On Thu, 5 Apr 2012, Jonathan Brown wrote:
>> Both expectsend and bytessent are always 0 when test case 1330 runs for
>> me...
>
> Right. So if you step out from there, how does the connection get closed?
Hm, when I check the log/trace1330 file it shows that libcurl actually closes
the connection after deeming that it gets an HTTP error response before it it
is done sending...
23:43:26.030116 == Info: About to connect() to 127.0.0.1 port 8990 (#0)
23:43:26.100720 == Info: Trying 127.0.0.1...
23:43:26.142391 == Info: connected
23:43:26.149776 == Info: Connected to 127.0.0.1 (127.0.0.1) port 8990 (#0)
23:43:26.182925 => Send header, 246 bytes (0xf6)
0000: PUT /1330 HTTP/1.1
0014: User-Agent: curl/7.25.1-DEV (i686-pc-linux-gnu) libcurl/7.25.1-D
0054: EV PolarSSL zlib/1.2.6 c-ares/1.7.6-DEV libidn/1.24 libssh2/1.4.
0094: 0_DEV librtmp/2.2e
00a8: Host: 127.0.0.1:8990
00be: Accept: */*
00cb: Content-Length: 0
00de: Expect: 100-continue
00f4:
23:43:26.218754 == Info: HTTP 1.1 or later with persistent connection,
pipelining supported
23:43:26.224701 <= Recv header, 37 bytes (0x25)
0000: HTTP/1.1 401 Authorization Required
23:43:26.231256 <= Recv header, 42 bytes (0x2a)
0000: Server: Apache/1.3.27 (Darwin) PHP/4.1.2
23:43:26.234456 <= Recv header, 60 bytes (0x3c)
0000: WWW-Authenticate: Blackmagic realm="gimme all yer s3cr3ts"
23:43:26.235259 <= Recv header, 55 bytes (0x37)
0000: WWW-Authenticate: Basic realm="gimme all yer s3cr3ts"
23:43:26.245531 <= Recv header, 74 bytes (0x4a)
0000: WWW-Authenticate: Digest realm="gimme all yer s3cr3ts", nonce="1
0040: 1223344"
23:43:26.251687 <= Recv header, 20 bytes (0x14)
0000: Content-Length: 26
23:43:26.255635 <= Recv header, 45 bytes (0x2d)
0000: Content-Type: text/html; charset=iso-8859-1
23:43:26.263573 == Info: HTTP error before end of send, stop sending
23:43:26.265591 <= Recv header, 2 bytes (0x2)
0000:
23:43:26.290794 == Info: Closing connection #0
23:43:26.315800 == Info: Issue another request to this URL:
'http://127.0.0.1:8990/1330'
23:43:26.323959 == Info: About to connect() to 127.0.0.1 port 8990 (#0)
23:43:26.324266 == Info: Trying 127.0.0.1...
23:43:26.324808 == Info: connected
23:43:26.325036 == Info: Connected to 127.0.0.1 (127.0.0.1) port 8990 (#0)
23:43:26.373905 == Info: Server auth using Digest with user 'testuser'
23:43:26.376135 => Send header, 396 bytes (0x18c)
0000: PUT /1330 HTTP/1.1
0014: Authorization: Digest username="testuser", realm="gimme all yer
0054: s3cr3ts", nonce="11223344", uri="/1330", response="6166128e2e27f
0094: 830f66edb3052cfef78"
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2012-04-05