about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rwxr-xr-xbollux11
1 files changed, 5 insertions, 6 deletions
diff --git a/bollux b/bollux index ed84894..8f6b596 100755 --- a/bollux +++ b/bollux
@@ -188,19 +188,18 @@ blastoff() { # blastoff [-u] URL
188 log d "PROTO='$proto' URL='$url'" 188 log d "PROTO='$proto' URL='$url'"
189 189
190 { 190 {
191 if declare -Fp "${proto}_request" >/dev/null; then 191 if declare -Fp "${proto}_request" &>/dev/null; then
192 run "${proto}_request" "$url" 192 run "${proto}_request" "$url"
193 else 193 else
194 log d "No request handler for '$proto'; trying gemini" 194 die 99 "No request handler for '$proto'!"
195 run gemini_request "$url"
196 fi 195 fi
197 } | run normalize | 196 } | run normalize |
198 { 197 {
199 if declare -Fp "${proto}_response" >/dev/null; then 198 if declare -Fp "${proto}_response" &>/dev/null; then
200 run "${proto}_response" "$url" 199 run "${proto}_response" "$url"
201 else 200 else
202 log d "No response handler for '$proto'; handling raw response" 201 log x "No response handler for '$proto', passing through"
203 raw_response 202 passthru
204 fi 203 fi
205 } 204 }
206} 205}