URL decode database name when parsing connection url (#3593)
This commit is contained in:
parent
a7f2928a1b
commit
e3ef8baf23
1 changed files with 5 additions and 1 deletions
|
@ -40,7 +40,11 @@ impl PgConnectOptions {
|
|||
|
||||
let path = url.path().trim_start_matches('/');
|
||||
if !path.is_empty() {
|
||||
options = options.database(path);
|
||||
options = options.database(
|
||||
&percent_decode_str(path)
|
||||
.decode_utf8()
|
||||
.map_err(Error::config)?,
|
||||
);
|
||||
}
|
||||
|
||||
for (key, value) in url.query_pairs().into_iter() {
|
||||
|
|
Loading…
Add table
Reference in a new issue