support urlencoded names
This commit is contained in:
parent
e6f049da4b
commit
7d051690f5
|
|
@ -44,6 +44,7 @@ handle() {
|
||||||
if ! [ "$method" = "GET" ]; then
|
if ! [ "$method" = "GET" ]; then
|
||||||
error 501 'Not Implemented' "Method $method is not implemented.${LF}Only GET is supported."
|
error 501 'Not Implemented' "Method $method is not implemented.${LF}Only GET is supported."
|
||||||
fi
|
fi
|
||||||
|
url="$(echo "$url" | urlencode -d)"
|
||||||
if ! echo "$url" | grep -q '^/'; then
|
if ! echo "$url" | grep -q '^/'; then
|
||||||
error 400 'Bad Request' "URL must be host-relative"
|
error 400 'Bad Request' "URL must be host-relative"
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user