download: Remove old-Guile leftovers.

This is a followup to 36626c556e.

* guix/build/download.scm (http-fetch): Rename 'port-or-bv' to 'port'.
Assume (port? port) is always true, and remove other branch.
This commit is contained in:
Ludovic Courtès 2017-10-16 22:21:02 +02:00
parent 9b396c0cab
commit b3ac341d4e
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -774,7 +774,7 @@ (define headers
#:timeout timeout
#:verify-certificate?
verify-certificate?))
((resp bv-or-port)
((resp port)
(http-get uri #:port connection #:decode-body? #f
#:streaming? #t
#:headers headers))
@ -787,14 +787,11 @@ (define headers
(begin
(call-with-output-file file
(lambda (p)
(if (port? bv-or-port)
(begin
(dump-port* bv-or-port p
#:buffer-size %http-receive-buffer-size
#:reporter (progress-reporter/file
(uri-abbreviation uri) size))
(newline))
(put-bytevector p bv-or-port))))
(dump-port* port p
#:buffer-size %http-receive-buffer-size
#:reporter (progress-reporter/file
(uri-abbreviation uri) size))
(newline)))
file))
((301 ; moved permanently
302 ; found (redirection)