download: Improve efficiency of 'write-request' over TLS.
This is another instance of <https://bugs.gnu.org/22966>. The Microsoft-IIS/7.5 server at static.nvd.nist.gov would sometimes hang when receiving our requests byte by byte. * guix/build/download.scm (tls-wrap) [!guile-2.0]: Add 'setvbuf' call.
This commit is contained in:
parent
c114c9c5d8
commit
866f37fb7e
|
@ -306,6 +306,13 @@ host name without trailing dot."
|
|||
;; never be closed. So we use `fileno', but keep a weak reference to
|
||||
;; PORT, so the file descriptor gets closed when RECORD is GC'd.
|
||||
(register-tls-record-port record port)
|
||||
|
||||
;; Write HTTP requests line by line rather than byte by byte:
|
||||
;; <https://bugs.gnu.org/22966>. This is not possible on Guile 2.0.
|
||||
(cond-expand
|
||||
(guile-2.0 #f)
|
||||
(else (setvbuf record 'line)))
|
||||
|
||||
record)))
|
||||
|
||||
(define (ensure-uri uri-or-string) ;XXX: copied from (web http)
|
||||
|
|
Loading…
Reference in New Issue