Skip to content

HTTP auth fails when REDIR_PROTOCOLS is not http #9885

@bagder

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.

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