Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions httpie/cli/argparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import sys
from argparse import RawDescriptionHelpFormatter
from textwrap import dedent
from urllib.parse import urlsplit
from urllib.parse import urlsplit, unquote

from requests.utils import get_netrc_auth

Expand Down Expand Up @@ -289,8 +289,9 @@ def _process_auth(self):
if self.args.auth is None and not auth_type_set:
if url.username is not None:
# Handle http://username:password@hostname/
username = url.username
password = url.password or ''
username = unquote(url.username) if url.username and url.username != unquote(url.username) else url.username
password = unquote(url.password) if url.password and url.password != unquote(url.password) else (url.password or '')

self.args.auth = AuthCredentials(
key=username,
value=password,
Expand Down
Loading