diff options
author | KatolaZ <katolaz@freaknet.org> | 2018-07-22 00:02:09 +0100 |
---|---|---|
committer | KatolaZ <katolaz@freaknet.org> | 2018-07-22 00:02:09 +0100 |
commit | fe87591ab64d343b6634a8aaae397ec1acb4d88c (patch) | |
tree | 7e76e982c4081c553eea8e8ebe5d51ee20c12c3a | |
parent | f8214c618faf6f99eebabd1b6d47a538eb938ab0 (diff) |
small change in generation of http redirect page
-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 |