mirror of
https://github.com/samsonjs/agate.git
synced 2026-03-25 09:05:50 +00:00
fix IRI error handling
This commit is contained in:
parent
a9ccbb07c9
commit
b6ff8f7758
1 changed files with 2 additions and 2 deletions
|
|
@ -455,9 +455,9 @@ impl RequestHandle {
|
||||||
let host = Host::parse(
|
let host = Host::parse(
|
||||||
&percent_decode_str(domain)
|
&percent_decode_str(domain)
|
||||||
.decode_utf8()
|
.decode_utf8()
|
||||||
.expect("invalid domain?"),
|
.or(Err((59, "Invalid URL")))?,
|
||||||
)
|
)
|
||||||
.expect("invalid domain?");
|
.or(Err((59, "Invalid URL")))?;
|
||||||
// TODO: simplify when <https://github.com/servo/rust-url/issues/586> resolved
|
// TODO: simplify when <https://github.com/servo/rust-url/issues/586> resolved
|
||||||
url.set_host(Some(&host.to_string()))
|
url.set_host(Some(&host.to_string()))
|
||||||
.expect("invalid domain?");
|
.expect("invalid domain?");
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue