Open schoettl opened 1 year ago
I setup a local test server with digest auth using apache:
htdigest -c /srv/http/passwd.digest 'private area' user
mkdir -p /srv/http/private
echo test > /srv/http/private/test.txt
Enable digest auth in apache/httpd (https://httpd.apache.org/docs/2.4/mod/mod_auth_digest.html) and
also enable the mod_auth_digest in /etc/httpd/conf/httpd.conf
.
Then I used tcpdump --interface lo -vv -w /tmp/curl
to capture the the TCP/HTTP traffic.
I compared the traffic caused by the two one-liners in my first post:
curl
at command line makes two HTTP requests and gives the correct result.curlGetString
from the Haskell library only makes one HTTP request and returns (CurlHttpReturnedError,"")
.Looking at the library's source, I couldn't find or fix the bug. With some help I'd like to try to fix it though. Currently I use command [] "curl" ["--digest", "-u", userpass, url]
from the command library. Shady... but it's a simple working solution.
Hi, thank you for this library!
I tried to access an API using digest authentication.
This works:
This does not work:
The output suggests that only one request is done.
But the command line
curl -vv
suggests that for digest auth a follow-up request is made. Maybe that follow up is not implemented? Any ideas on this?