Commit 13b0483d authored by Dr Ian Preston's avatar Dr Ian Preston Committed by Steven Allen

Don't url decode protocol name. It won't work.

License: MIT
Signed-off-by: default avatarIan Preston <ianopolous@protonmail.com>
parent 83369b57
......@@ -57,13 +57,8 @@ func parseRequest(request *http.Request) (*proxyRequest, error) {
if len(split) < 6 {
return nil, fmt.Errorf("Invalid request path '%s'", path)
}
//url-decode the name
decodedName, err := url.PathUnescape(split[4])
if err != nil {
return nil, err
}
return &proxyRequest{split[3], protocol.ID(decodedName), split[5]}, nil
return &proxyRequest{split[3], protocol.ID(split[4]), split[5]}, nil
}
func handleError(w http.ResponseWriter, msg string, err error, code int) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment