Skip to content

Authentication data not handled #88

@ntninja

Description

@ntninja

The following code:

#!/usr/bin/env python3
import requests_unixsocket
with requests_unixsocket.Session() as s:
        print(s.get("http+unix://radicale@%2Frun%2Fmodoboa%2Fgunicorn.sock/api/o/introspect/"))

Results in the following SysCall:

connect(5, {sa_family=AF_UNIX, sun_path="radicale@/run/modoboa/gunicorn.sock"}, 38) = -1 ENOENT (No such file or directory)

Obviously the authentication info should no be part of the socket name, but rather be used for HTTP authentication after connecting.

Notably, passing Basic Auth data using the auth= parameter does work, so there is the workaround of using urllib3.util.parse_url to extract the authentication data yourself and pass it that way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions