This commit is contained in:
flywind 2021-03-30 02:48:06 +08:00 • committed by GitHub
commit 1f1ef85eb0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 1 deletions

View file

@ -294,7 +294,7 @@ func parseUri*(uri: string, result: var Uri) =
var i = 0
# Check if this is a reference URI (relative URI)
let doubleSlash = uri.len > 1 and uri[1] == '/'
let doubleSlash = uri.len > 1 and uri[0] == '/' and uri[1] == '/'
if i < uri.len and uri[i] == '/':
# Make sure `uri` doesn't begin with '//'.
if not doubleSlash: