Skip to content

Conversation

@MariaCodesXoXo
Copy link

@MariaCodesXoXo MariaCodesXoXo commented Dec 27, 2025

Problem
HTTPie fails to decode percent-encoded characters in the username/password when they are included in the URL.
For example:
bash
http https://u%40d:1%3d2%3f@httpbin.org/basic-auth/u%40d/1%3d2%3f
returns a 401 Unauthorized.

reproduction specifications
OS: windows 11
pip version 25.3
python version 3.14
http version 3.2.4
steps followed to reproduce:
windows button and write cmd
in the command line window write : pip install httpie
in the HTTPie command run: http https://u%40d:1%3d2%3f@httpbin.org/basic-auth/u%40d/1%3d2%3f
result as shown in the screenshot:
Screenshot 2025-12-27 165710

run http --debug https://u%40d:1%3d2%3f@httpbin.org/basic-auth/u%40d/1%3d2%3f
to show details according to issue steps :
image
image

expected behavior should be same as running curl https://u%40d:1%3d2%3f@httpbin.org/basic-auth/u%40d/1%3d2%3f
curl successful output :
image

unlike what's mentioned in the issue documentation using the flag --auth doesn't give the desired output either
curl decodes the unserinfo before building the authorization header and that's why it works

solving the username/password authorization issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant