-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
Is your feature request related to a problem?
I'm trying to send SOAP requests to an ONVIF camera which requires digest authenticaton. When --digest option is selected curl initially sends an empty request to initiate authorization. Unfortunately this particular device doesn't reply to the request if its content is empty. Solution seems to be sending the full request content also in the initial request. The way to do that in curl seems to be --anyauth option. With this option curl sends the initial request with full content and it figures out the auth mechanism from the first reply. Then it sends the request again this time with the authorization information.
Possible Solution
Add an authorization option like cpr::AuthMode::ANY that sets CURLAUTH_ANY flag.
Alternatives
As a workaround I can set the flag by accessing curl handle directly, not sure if this is official part of API or just something added for tests.
curl_easy_setopt(session.GetCurlHolder()->handle, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
Additional Context
No response