abort if bad HTTP reply
svn: r1520
This commit is contained in:
parent
e1cf51dea0
commit
ef87bdc876
|
@ -15,7 +15,8 @@
|
||||||
(fprintf o "GET ~a HTTP/1.0\r\nHost: ~a\r\n\r\n" path host)
|
(fprintf o "GET ~a HTTP/1.0\r\nHost: ~a\r\n\r\n" path host)
|
||||||
(flush-output o)
|
(flush-output o)
|
||||||
(close-output-port o)
|
(close-output-port o)
|
||||||
(regexp-match #rx"^HTTP/[0-9.]+ 200 OK\r\n.*?\r\n\r\n" i)
|
(unless (regexp-match #rx"^HTTP/[0-9.]+ 200 OK\r\n.*?\r\n\r\n" i)
|
||||||
|
(error 'url->port "bad reply from server: ~a" (read-line)))
|
||||||
i)
|
i)
|
||||||
|
|
||||||
(define error-value
|
(define error-value
|
||||||
|
|
Loading…
Reference in New Issue
Block a user