1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

net.urllib: don't crash on str() if url is missing host (#10313)

This commit is contained in:
Ryan Roden-Corrent
2021-06-02 09:12:27 -04:00
committed by GitHub
parent f6bb4d9a4a
commit a368800b26
2 changed files with 8 additions and 2 deletions

View File

@ -43,3 +43,9 @@ fn test_parse_query() ? {
assert q1.data['format'].data == ['"%l: %c %t"']
assert q2.data['format'].data == ['"%l: %c %t"']
}
fn test_parse_missing_host() ? {
// issue #10311
url := urllib.parse('http:///') ?
assert url.str() == 'http://///'
}