Don't url decode protocol name. It won't work.
License: MIT Signed-off-by: Ian Preston <ianopolous@protonmail.com>
Dr Ian Preston committed
Oct 28, 2018 at 13:52 UTC
13b0483df04b134e6c047d52304b5954b37f33ea
1 file changed
+1
-6
core/corehttp/proxy.go
+1
-6
@@ -57,13 +57,8 @@ func parseRequest(request *http.Request) (*proxyRequest, error) {
57
if len(split) < 6 {
58
return nil, fmt.Errorf("Invalid request path '%s'", path)
59
}
60
- //url-decode the name
61
- decodedName, err := url.PathUnescape(split[4])
62
- if err != nil {
63
- return nil, err
64
- }
60
66
- return &proxyRequest{split[3], protocol.ID(decodedName), split[5]}, nil
61
+ return &proxyRequest{split[3], protocol.ID(split[4]), split[5]}, nil
62
}
63
64
func handleError(w http.ResponseWriter, msg string, err error, code int) {