diff --git a/server.sh b/server.sh index db4860c..958635c 100755 --- a/server.sh +++ b/server.sh @@ -44,6 +44,7 @@ handle() { if ! [ "$method" = "GET" ]; then error 501 'Not Implemented' "Method $method is not implemented.${LF}Only GET is supported." fi + url="$(echo "$url" | urlencode -d)" if ! echo "$url" | grep -q '^/'; then error 400 'Bad Request' "URL must be host-relative" fi