about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rwxr-xr-xbollux9
1 files changed, 5 insertions, 4 deletions
diff --git a/bollux b/bollux index 63dfe85..4864e48 100755 --- a/bollux +++ b/bollux
@@ -353,12 +353,13 @@ handle_response() {
353display() { 353display() {
354 # split header line 354 # split header line
355 local -a hdr 355 local -a hdr
356 local i
356 IFS=$'\n' read -d "" -ra hdr <<<"${1//;/$'\n'}" 357 IFS=$'\n' read -d "" -ra hdr <<<"${1//;/$'\n'}"
357 358
358 mime="${hdr[0],,}" 359 mime="$(trim "${hdr[0],,}")"
359 for h in "${hdr[@]}"; do 360 for ((i=1;i<="${#hdr[@]}";i++)); do
360 h="$(trim "$h")" 361 h="$(trim "${hdr[$i]}")"
361 log d "$h" 362 log d "'$h'"
362 case "$h" in 363 case "$h" in
363 charset=*) charset="${h#charset=}" ;; 364 charset=*) charset="${h#charset=}" ;;
364 esac 365 esac