mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
http-client: 'http-fetch' and 'http-fetch/cached' support HTTPS.
* guix/http-client.scm (http-fetch): Use 'open-connection-for-uri', to support HTTPS.
This commit is contained in:
parent
d8c66da7c1
commit
8a5063f777
1 changed files with 3 additions and 2 deletions
|
@ -35,7 +35,8 @@ (define-module (guix http-client)
|
|||
#:use-module ((guix build utils)
|
||||
#:select (mkdir-p dump-port))
|
||||
#:use-module ((guix build download)
|
||||
#:select (open-socket-for-uri resolve-uri-reference))
|
||||
#:select (open-socket-for-uri
|
||||
open-connection-for-uri resolve-uri-reference))
|
||||
#:re-export (open-socket-for-uri)
|
||||
#:export (&http-get-error
|
||||
http-get-error?
|
||||
|
@ -207,7 +208,7 @@ (define* (http-fetch uri #:key port (text? #f) (buffered? #t))
|
|||
|
||||
Raise an '&http-get-error' condition if downloading fails."
|
||||
(let loop ((uri uri))
|
||||
(let ((port (or port (open-socket-for-uri uri))))
|
||||
(let ((port (or port (open-connection-for-uri uri))))
|
||||
(unless buffered?
|
||||
(setvbuf port _IONBF))
|
||||
(let*-values (((resp data)
|
||||
|
|
Loading…
Reference in a new issue