Fix socket leak on redirected `*-pure-port' calls.
A port over which a redirection is served to get-pure-port is not closed if `get-pure-port' follows the redirection. This leaks file descriptors on the host machine.
This commit is contained in:
parent
fa0336bfad
commit
25bc661a03
|
@ -254,6 +254,7 @@
|
|||
(regexp-match #rx"^HTTP/[0-9]+[.][0-9]+ 3[0-9][0-9]" status))
|
||||
(cond
|
||||
[(and redirection-status-line? new-url (not (zero? redirections)))
|
||||
(close-input-port ip)
|
||||
(redirection-loop (- redirections 1) new-url)]
|
||||
[else
|
||||
(define-values (in-pipe out-pipe) (make-pipe))
|
||||
|
|
Loading…
Reference in New Issue
Block a user