diff options
author | KatolaZ <katolaz@freaknet.org> | 2018-08-14 06:10:09 +0100 |
---|---|---|
committer | KatolaZ <katolaz@freaknet.org> | 2018-08-14 06:10:09 +0100 |
commit | 02f1dc94fdad9b09db9cd4f40d8bf3ce02142da2 (patch) | |
tree | 85a699cd24d0c9effa93bcbcf4f4bd22da42b246 | |
parent | 90d42de2ba829cf77e94c7f5b5c2bf88eb1fd922 (diff) |
fix on gph rendering
-rwxr-xr-x | gosher | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -37,7 +37,7 @@ ## ## -## NETCAT: the netcat command to use, and any additional option +## NETCAT: the netcat command to use, without additional options ## ### Original netcat ##NETCAT="nc.traditional" @@ -49,6 +49,11 @@ NETCAT="nc" ## +## NETCAT_OPTS: any additional options to netcat +## +NETCAT_OPTS="" + +## ## STYLE: The way in which netcat will talk to gosher_serve ## ### fork with "-c" (Does *not* work with OpenBSD netcat!!!!!) @@ -164,9 +169,9 @@ serve_index(){ while read -r line; do rline=$(echo "$line" | tr -d '\r') case "$rline" in - '['*) - line=$(echo "$rline" | sed -r -e 's/^\[//;s/\]$//;s/\|/ /g;s/ / /;') - line=$(echo "$line" | sed -r -e "s/server port/$HOSTNAME $PORT/") + '['*) + line=$(echo "$rline" | sed -r -e "s/ / /g;s/server\|port\]$/$HOSTNAME $PORT/") + line=$(echo "$line" | sed -r -e 's/^\[//;s/\]$//;s/\|/ /g;s/ //1') ;; t*) line=$(echo "$rline" | cut -b 2-) |