Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP auth fails when REDIR_PROTOCOLS is not http #9885

Closed
bagder opened this issue Nov 10, 2022 · 0 comments
Closed

HTTP auth fails when REDIR_PROTOCOLS is not http #9885

bagder opened this issue Nov 10, 2022 · 0 comments

Comments

@bagder
Copy link
Member

bagder commented Nov 10, 2022

I did this

The application does a regular GET of an HTTP URL:

  test_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
  test_setopt(curl, CURLOPT_USERNAME, "user");
  test_setopt(curl, CURLOPT_PASSWORD, "password");
  test_setopt(curl, CURLOPT_REDIR_PROTOCOLS_STR, "imap");

The server responds with a 401 and regular WWW-Authenticate: response headers.

libcurl fails to get the URL.

I expected the following

Successful retrieval of the page. Removing the CURLOPT_REDIR_PROTOCOLS_STR line makes it succeed again.

curl/libcurl version

current git master, but this is a bug that probably has always existed.

operating system

Linux, but is platform agnostic.

bagder added a commit that referenced this issue Nov 11, 2022
To make regular auth "reloads" to not count as redirects.

Verified by test 3101

Fixes #9885
Closes #98..
@bagder bagder changed the title HTTP auth fails when REDIR_PROTOCOLS is blank HTTP auth fails when REDIR_PROTOCOLS is not http Nov 11, 2022
bagder added a commit that referenced this issue Nov 11, 2022
To make regular auth "reloads" to not count as redirects.

Verified by test 3101

Fixes #9885
Closes #98..
@bagder bagder closed this as completed in fa0b922 Nov 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

1 participant