curl-users
curl PUT not working correctly with --digest option
Date: Tue, 13 Apr 2010 16:37:07 +0200
Hi there,
I am having problems with (great) curl tool. The PUT method does not
work with the --digest option.
****
WITHOUT --digest:
=== curl-command
curl -X PUT -d @payload.xml http://localhost:8080/api/ads/712566 -H
"Content-Type: application/xml"
=== ngrep output
T 127.0.0.1:33558 -> 127.0.0.1:8080 [AP]
PUT /api/ads/712566 HTTP/1.1..User-Agent: curl/7.19.5
(i486-pc-linux-gnu) libcurl/7.19.5 OpenSSL/0.9.8g zlib/1.2.3.3
libidn/1.15..Host: localhost:8080..Accept: *
/*..Content-Type: application/xml..Content-Length: 2928..Expect:
100-continue....
****
WITH --digest:
=== curl-command
curl -X PUT -d @payload.xml http://localhost:8080/api/ads/712566 -H
"Content-Type: application/xml" --digest -u foo:bar
=== ngrep output
T 127.0.0.1:33511 -> 127.0.0.1:8080 [AP]
PUT /api/ads/712566 HTTP/1.1..User-Agent: curl/7.19.5
(i486-pc-linux-gnu) libcurl/7.19.5 OpenSSL/0.9.8g zlib/1.2.3.3
libidn/1.15..Host: localhost:8080..Accept: *
/*..Content-Type: application/xml..Content-Length: 0....
Compare the Content-Length entry (2928K vs 0K). Seeing this I guess that
--digest doesn't go well with the PUT option. It works fine for POST.
Version of curl:
curl 7.19.5 (i486-pc-linux-gnu) libcurl/7.19.5 OpenSSL/0.9.8g
zlib/1.2.3.3 libidn/1.15
thanks.
-- manuel aldana aldana_at_gmx.de software-engineering blog: http://www.aldana-online.de ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-users FAQ: http://curl.haxx.se/docs/faq.html Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2010-04-13