diff options
Diffstat (limited to 'gosher')
-rwxr-xr-x | gosher | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -160,6 +160,9 @@ serve_redirect(){ Click to be redirected to: <a href="$url">$url</a> </body> EOF + exec 1>&- + exec 2>&- + exit 0 } @@ -178,7 +181,7 @@ selector=$(echo $selector | sed -r 's:\$.*::g;s:\r::g' ) } case $selector in - /URL:*) + URL:*) url=$(echo $selector | cut -d ":" -f 2-) serve_redirect $url ;; @@ -205,6 +208,7 @@ case $selector in *) [ -f "${GOPHERDIR}/gophermap" ] && serve_selector "${GOPHERDIR}/gophermap" [ -f "${GOPHERDIR}/index.gph" ] && serve_index "${GOPHERDIR}/index.gph" + echo "got invalid selector: \"$selector\"" >&2 invalid_selector "/" ;; esac |