summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKatolaZ <katolaz@freaknet.org>2018-07-22 00:02:09 +0100
committerKatolaZ <katolaz@freaknet.org>2018-07-22 00:02:09 +0100
commitfe87591ab64d343b6634a8aaae397ec1acb4d88c (patch)
tree7e76e982c4081c553eea8e8ebe5d51ee20c12c3a
parentf8214c618faf6f99eebabd1b6d47a538eb938ab0 (diff)
small change in generation of http redirect page
-rwxr-xr-xgosher6
1 files changed, 5 insertions, 1 deletions
diff --git a/gosher b/gosher
index a0fa98b..668a2db 100755
--- a/gosher
+++ b/gosher
@@ -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