Skip to content

HTTP auth fails when REDIR_PROTOCOLS is not http #9885

Closed

Description

@bagder

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.

Activity

  1. changed the title [-]HTTP auth fails when REDIR_PROTOCOLS is blank[/-] [+]HTTP auth fails when REDIR_PROTOCOLS is not http[/+] on Nov 11, 2022
  2. added a commit that references this issue on Nov 11, 2022
    7aeaf9e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions