net/http-client: fix http-conn-live?
result
Merge to v6.0
(cherry picked from commit 1f6453de89
)
This commit is contained in:
parent
f61b212293
commit
b923f9c1b2
|
@ -78,6 +78,22 @@
|
|||
#:headers empty
|
||||
#:data #f)
|
||||
raw ereq estatus eheaders econtent))
|
||||
#,(syntax/loc stx
|
||||
(test-e the-port
|
||||
(let ([c (hc:http-conn-open "localhost"
|
||||
#:port the-port
|
||||
#:ssl? #f)])
|
||||
(check-equal? #t (hc:http-conn-live? c))
|
||||
(hc:http-conn-send! c
|
||||
"/"
|
||||
#:method "GET"
|
||||
#:headers empty
|
||||
#:data #f)
|
||||
(begin0
|
||||
(hc:http-conn-recv! c
|
||||
#:close? #t)
|
||||
(check-equal? #f (hc:http-conn-live? c))))
|
||||
raw ereq estatus eheaders econtent))
|
||||
#,(syntax/loc stx
|
||||
(test-e the-port
|
||||
(u:http-sendrecv/url
|
||||
|
|
|
@ -44,7 +44,8 @@
|
|||
|
||||
(define (http-conn-live? hc)
|
||||
(and (http-conn-to hc)
|
||||
(http-conn-from hc)))
|
||||
(http-conn-from hc)
|
||||
#t))
|
||||
|
||||
(define (http-conn-open! hc host-bs #:ssl? [ssl? #f] #:port [port (if ssl? 443 80)])
|
||||
(http-conn-close! hc)
|
||||
|
|
Loading…
Reference in New Issue
Block a user