http-client: No 'setvbuf' for non-file ports.

* guix/http-client.scm (http-fetch): Do not call 'setvbuf' on non-file
ports.
This commit is contained in:
Ludovic Courtès 2016-03-16 10:20:45 +01:00
parent 247d498aaa
commit 409e4ac6e3
1 changed files with 1 additions and 1 deletions

View File

@ -243,7 +243,7 @@ Raise an '&http-get-error' condition if downloading fails."
(base64-encode
(string->utf8 str))))))
(_ '()))))
(unless buffered?
(unless (or buffered? (not (file-port? port)))
(setvbuf port _IONBF))
(let*-values (((resp data)
;; Try hard to use the API du jour to get an input port.