Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unquote connection string components properly #472

Merged
merged 1 commit into from
Oct 3, 2019
Merged

Conversation

elprans
Copy link
Member

@elprans elprans commented Aug 19, 2019

When a connection string component contains characters that have a
special meaning in the URI (e.g. '@' or '='), percent-encoding must be
used. asyncpg must take care to unquote the parsed components
correctly, and it doesn't currently.

Additionally, this makes asyncpg follow the libpq's behavior of parsing
the authentication part of netloc, i.e. split on the first '@' and not
the last.

Fixes: #418
Fixes: #471

When a connection string component contains characters that have a
special meaning in the URI (e.g. '@' or '='), percent-encoding must be
used.  asyncpg must take care to unquote the parsed components
correctly, and it doesn't currently.

Additionally, this makes asyncpg follow the libpq's behavior of parsing
the authentication part of netloc, i.e. split on the first '@' and not
the last.

Fixes: #418
Fixes: #471
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.

[Errno -2] Name or service not known
1 participant