diff options
author | Case Duckworth | 2020-05-23 19:47:44 -0500 |
---|---|---|
committer | Case Duckworth | 2020-05-23 19:47:44 -0500 |
commit | 341fb268c2bdb62e1b4ce50da074b843215dc7ad (patch) | |
tree | f2f12cc5c957ae45d9f139fa14f8bed1445d26f6 | |
parent | Add SNI support (diff) | |
download | bollux-341fb268c2bdb62e1b4ce50da074b843215dc7ad.tar.gz bollux-341fb268c2bdb62e1b4ce50da074b843215dc7ad.zip |
Read statusline until \r
-rwxr-xr-x | bollux | 2 |
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 |
210 | handle() { # handle URL < RESPONSE | 210 | handle() { # 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")" |