Cope with network error when considering redirection
This commit is contained in:
parent
98b62a5bc8
commit
a445c6860a
|
@ -71,8 +71,9 @@
|
|||
(stop-when (message (web-response-complete req-id $resp $response-body))
|
||||
(printf "~a <-- ~v ~v\n" req-id resp response-body)
|
||||
(k resp response-body))))
|
||||
(define location (dict-ref (web-response-header-headers resp) 'location #f))
|
||||
(if (and (eq? (web-response-header-code-type resp) 'redirection)
|
||||
(define location (and resp (dict-ref (web-response-header-headers resp) 'location #f)))
|
||||
(if (and resp
|
||||
(eq? (web-response-header-code-type resp) 'redirection)
|
||||
(positive? redirect-budget)
|
||||
location)
|
||||
(web-request! verb location
|
||||
|
|
Loading…
Reference in New Issue