From 866f37fb7e4f3e0bd695a951071383cdff3da8cd Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 15 Nov 2017 09:59:29 +0100 Subject: download: Improve efficiency of 'write-request' over TLS. This is another instance of . 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. --- guix/build/download.scm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/guix/build/download.scm b/guix/build/download.scm index 90de269f9b..4490d225e6 100644 --- a/guix/build/download.scm +++ b/guix/build/download.scm @@ -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: + ;; . 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) -- cgit v1.2.3