about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rwxr-xr-xbollux8
1 files changed, 6 insertions, 2 deletions
diff --git a/bollux b/bollux index c938abe..2e0aa0e 100755 --- a/bollux +++ b/bollux
@@ -206,7 +206,8 @@ transform_resource() { # transform_resource BASE_URL REFERENCE_URL
206 # cf. 5.3 -- recomposition 206 # cf. 5.3 -- recomposition
207 local r="" 207 local r=""
208 isdefined "T[scheme]" && r="$r${T[scheme]}:" 208 isdefined "T[scheme]" && r="$r${T[scheme]}:"
209 isdefined "T[authority]" && r="$r//${T[authority]}" 209 # remove the port from the authority
210 isdefined "T[authority]" && r="$r//${T[authority]%:*}"
210 r="$r${T[path]}" 211 r="$r${T[path]}"
211 isdefined T[query] && r="$r?${T[query]}" 212 isdefined T[query] && r="$r?${T[query]}"
212 isdefined T[fragment] && r="$r#${T[fragment]}" 213 isdefined T[fragment] && r="$r#${T[fragment]}"
@@ -343,7 +344,10 @@ handle_response() {
343 REDIRECTS=0 344 REDIRECTS=0
344 die "$((100 + code))" "$code" 345 die "$((100 + code))" "$code"
345 ;; 346 ;;
346 *) die "$((100 + code)) Unknown response code: $code." ;; 347 *)
348 [[ -z "${code-}" ]] && die 100 "Empty response code."
349 die "$((100 + code)) Unknown response code: $code."
350 ;;
347 esac 351 esac
348} 352}
349 353