fix on gph rendering

master
KatolaZ 6 years ago
parent 90d42de2ba
commit 02f1dc94fd
  1. 13
      gosher

@ -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"
@ -48,6 +48,11 @@
### OpenBSD netcat
NETCAT="nc"
##
## NETCAT_OPTS: any additional options to netcat
##
NETCAT_OPTS=""
##
## STYLE: The way in which netcat will talk to gosher_serve
##
@ -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-)

Loading…
Cancel
Save