urllib: crash when converting URL to str

pull/2672/head
Abdullah Atta 2019-11-07 00:34:33 +05:00 committed by Alexander Medvednikov
parent 7c70f3df93
commit c4e9f09f0f
1 changed files with 1 additions and 1 deletions

View File

@ -564,7 +564,7 @@ fn parse_authority(authority string) ?ParseAuthorityRes {
host = h
}
if i < 0 {
return ParseAuthorityRes{host: host}
return ParseAuthorityRes{host: host, user: user}
}
mut userinfo := authority[..i]
if !valid_userinfo(userinfo) {