cURL / Mailing Lists / curl-library / Single Mail

curl-library

[ curl-Bugs-1054859 ] PUT with digest auth, sends HEAD

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Tue, 26 Oct 2004 13:58:38 -0700

Bugs item #1054859, was opened at 2004-10-26 13:58
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=1054859&group_id=976

Category: http
Group: wrong behaviour
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Daniel Stenberg (bagder)
Summary: PUT with digest auth, sends HEAD

Initial Comment:
This is a regression. It used to work in 7.11.0.

I am attempting to PUT some data. The resource does not
exist on the server. curl incorrectly sends a HEAD request.

Thanks,
Grant Murray
email_at_grantmurray.com

### trace for 7.12.0 demonstrating the wrong behavior
curl -v --digest --user "testuser0:testuserpassword0"
-X PUT --data "A very small file."
http://localhost:9876/user/testuser0/testfile1
* About to connect() to localhost port 9876
* Connected to localhost (127.0.0.1) port 9876
* Server auth using Digest with user 'testuser0'
> HEAD /user/testuser0/testfile1 HTTP/1.1
User-Agent: curl/7.12.0 (i686-pc-linux-gnu)
libcurl/7.12.0 OpenSSL/0.9.7d zlib/1.2.1
Host: localhost:9876
Pragma: no-cache
Accept: */*

< HTTP/1.1 404 Not Found
< Date: Tue, 26 Oct 2004 19:54:13 GMT
< Server: Apache/2.0.52 (Gentoo/Linux)
< Content-Type: text/html; charset=iso-8859-1
* Connection #0 to host localhost left intact
* Closing connection #0

### trace for 7.11.0 showing good behavior
curl -v --digest --user "testuser0:testuserpassword0"
-X PUT --data "A very small file."
http://localhost:9876/user/testuser0/testfile1
* About to connect() to localhost port 9876
* Connected to localhost (127.0.0.1) port 9876
> PUT /user/testuser0/testfile1 HTTP/1.1
User-Agent: curl/7.11.0 (i686-pc-linux-gnu)
libcurl/7.11.0 OpenSSL/0.9.7d zlib/1.2.1
Host: localhost:9876
Pragma: no-cache
Accept: image/gif, image/x-xbitmap, image/jpeg,
image/pjpeg, */*

< HTTP/1.1 401 Authorization Required
< Date: Tue, 26 Oct 2004 20:54:48 GMT
< Server: Apache/2.0.52 (Gentoo/Linux)
< WWW-Authenticate: Digest realm="flick users",
nonce="0Nhz61/nAwA=f5dbad60f0c028060cfa60f5df0b3e023fa34e17",
algorithm=MD5, qop="auth"
< Content-Length: 401
< Content-Type: text/html; charset=iso-8859-1
* Ignoring the response-body
* Connection #0 left intact
* Issue another request to this URL:
'http://localhost:9876/user/testuser0/testfile1'
* Re-using existing connection! (#0)
* Connected to (127.0.0.1) port 9876
* Server auth using Digest with user 'testuser0'
> PUT /user/testuser0/testfile1 HTTP/1.1
Authorization: Digest username="testuser0",
realm="flick users",
nonce="0Nhz61/nAwA=f5dbad60f0c028060cfa60f5df0b3e023fa34e17",
uri="/user/testuser0/testfile1",
response="b470bff9b3e08057ab1f4f4c88d8cf85"
User-Agent: curl/7.11.0 (i686-pc-linux-gnu)
libcurl/7.11.0 OpenSSL/0.9.7d zlib/1.2.1
Host: localhost:9876
Pragma: no-cache
Accept: image/gif, image/x-xbitmap, image/jpeg,
image/pjpeg, */*
Content-Length: 18
Content-Type: application/x-www-form-urlencoded

A very small file.< HTTP/1.1 200 OK
< Date: Tue, 26 Oct 2004 20:54:48 GMT
< Server: Apache/2.0.52 (Gentoo/Linux)
< Authentication-Info:
rspauth="eeab07c46f77f7c99895eead880d66d8"
< Content-Length: 0
< Content-Type: text/plain
* Connection #0 left intact
* Closing connection #0

###
uname -a
Linux coot 2.6.9-gentoo-r1 #1 SMP Mon Oct 25 17:21:17
PDT 2004 i686 Intel(R) Pentium(R) 4 CPU 2.60GHz
GenuineIntel GNU/Linux

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=1054859&group_id=976
Received on 2004-10-26