about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2020-05-23 19:47:44 -0500
committerCase Duckworth2020-05-23 19:47:44 -0500
commit341fb268c2bdb62e1b4ce50da074b843215dc7ad (patch)
treef2f12cc5c957ae45d9f139fa14f8bed1445d26f6
parentAdd SNI support (diff)
downloadbollux-341fb268c2bdb62e1b4ce50da074b843215dc7ad.tar.gz
bollux-341fb268c2bdb62e1b4ce50da074b843215dc7ad.zip
Read statusline until \r
-rwxr-xr-xbollux2
1 files changed, 1 insertions, 1 deletions
diff --git a/bollux b/bollux index 10b43d0..ab9e76b 100755 --- a/bollux +++ b/bollux
@@ -209,7 +209,7 @@ request() { # request [-s SERVER] URL
209# cf. gemini://gemini.circumlunar.space/docs/spec-spec.txt 209# cf. gemini://gemini.circumlunar.space/docs/spec-spec.txt
210handle() { # handle URL < RESPONSE 210handle() { # handle URL < RESPONSE
211 URL="$1" 211 URL="$1"
212 while read -r head; do 212 while read -d $'\r' -r head; do
213 break # wait to read the first line 213 break # wait to read the first line
214 done 214 done
215 code="$(awk '{print $1}' <<<"$head")" 215 code="$(awk '{print $1}' <<<"$head")"