Skip to content

Commit eb5e50a

Browse files
authored
Merge pull request #54 from Tenzer/fix-dasht-server-http-with-bare-url
Fix dasht-server-http serving "400 Bad Request" on requests for "/"
2 parents 5a741da + d2bbcc6 commit eb5e50a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/dasht-server-http

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ url=$(awk '
7575

7676
# serve translated local file:// URLs over HTTP
7777
# (skip the / homepage and /? form submissions)
78-
if ! echo "$url" | grep -q '^/$\|^/?'; then
78+
if ! test "$url" = / -o -z "${url##/\?*}"; then
7979
file=${url%#*} # strip URI fragment, if any
8080

8181
if test -f "$file"; then

0 commit comments

Comments
 (0)