Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Skyenought committed Nov 23, 2023
1 parent f2e09d3 commit 3dee6ef
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/protocol/uri_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,15 @@ func checkSchemeWhenCharIsColon(i int, rawURL []byte) (scheme, path []byte) {
hlog.Errorf("error happened when trying to parse the rawURL(%s): missing protocol scheme", rawURL)
return
}
if i+2 <= len(rawURL) && rawURL[i+1] == '/' {
if i+2 < len(rawURL) && rawURL[i+1] == '/' {
if rawURL[i+2] == '/' {
return rawURL[:i], rawURL[i+1:]
}
return nil, rawURL
}

if len(rawURL) == i+2 && rawURL[i+1] == '/' {
return nil, rawURL
}
return
}

0 comments on commit 3dee6ef

Please sign in to comment.