From 3dee6ef75b5917dc72c16750727ad71b8f35a069 Mon Sep 17 00:00:00 2001 From: Skyenought Date: Thu, 23 Nov 2023 19:13:54 +0800 Subject: [PATCH] update --- pkg/protocol/uri_windows.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/protocol/uri_windows.go b/pkg/protocol/uri_windows.go index 128e26f45..11d7d86e0 100644 --- a/pkg/protocol/uri_windows.go +++ b/pkg/protocol/uri_windows.go @@ -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 }