summaryrefslogtreecommitdiff
path: root/guix/http-client.scm
Commit message (Collapse)AuthorAge
* http-client: No 'setvbuf' for non-file ports.Ludovic Courtès2016-03-16
| | | | | * guix/http-client.scm (http-fetch): Do not call 'setvbuf' on non-file ports.
* http-client: Add #:keep-alive? parameter.Ludovic Courtès2016-03-14
| | | | | * guix/http-client.scm (http-fetch): Add #:keep-alive? parameter and pass it to 'http-get' or 'http-get*'.
* http-client: 'http-client/cached' uses unique cache file names.Ludovic Courtès2016-02-25
| | | | | | * guix/http-client.scm (cache-file-for-uri): New procedure. (http-fetch/cached): Use it. Remove 'directory' variable. [update-cache]: Make the 'dirname' of FILE.
* http-client: 'http-fetch/cached' updates the cache atomically.Ludovic Courtès2016-02-25
| | | | | * guix/http-client.scm (http-fetch/cached)[update-cache]: Use 'with-atomic-file-output' instead of 'call-with-output-file'.
* http-client: Work around <http://bugs.gnu.org/22273>.Ludovic Courtès2016-01-06
| | | | * guix/http-client.scm (read-header-line): New procedure. Use it.
* http-client: Fix erroneous comment.Ludovic Courtès2016-01-06
| | | | | * guix/http-client.scm: Fix Guile version number in comment for Guile commit 5a10e41.
* http-client: Support basic authentication.Ricardo Wurmus2015-12-21
| | | | | * guix/http-client.scm (http-fetch): Add Authorization header to request when the URI contains userinfo.
* http-client: 'http-fetch' converts strings to URIs.Ludovic Courtès2015-11-29
| | | | | * guix/http-client.scm (http-fetch): Use 'string->uri' if URI is a string. Fixes a regression introduced in 8a5063f.
* http-client: 'http-fetch' and 'http-fetch/cached' support HTTPS.Ludovic Courtès2015-11-26
| | | | | * guix/http-client.scm (http-fetch): Use 'open-connection-for-uri', to support HTTPS.
* http-client: '%http-cache-ttl' is really a parameter.Ludovic Courtès2015-10-21
| | | | | | | Fixes a typo in commit 739ab68 that made it a procedure returning a parameter. * guix/http-client.scm (%http-cache-ttl): Turn into a parameter.
* http-client: Add 'http-fetch/cached'.Ludovic Courtès2015-10-17
| | | | | | * guix/utils.scm (cache-directory): New procedure. * guix/http-client.scm (%http-cache-ttl): New variable. (http-fetch/cached): New procedure.
* http-client: Backport Guile fix for 'read-chunk-header'.Ludovic Courtès2015-09-26
| | | | | | | | Fixes the wrong-type-arg exception initially reported at <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19976#5> by Ricardo Wurmus <rekado@elephly.net>. * guix/http-client.scm (read-chunk-header): Backport Guile commit 53b8d5f.
* http-client: Backport delimited input port fix from Guile.Ludovic Courtès2015-09-10
| | | | | | * guix/http-client.scm (make-delimited-input-port): Backport Guile commit 5a10e41. Monkey-patch 'make-delimited-input-port' for any Guile <= 2.0.11.
* http-client: Remove redundant import clause.Ludovic Courtès2015-09-10
| | | | * guix/http-client.scm: Remove redundant #:use-module (guix utils).
* http-client: Remove monkey patching for 2.0.5.Ludovic Courtès2015-05-10
| | | | | * guix/http-client.scm (read-response-body*): Remove. (http-fetch): Remove hacks for 2.0.5.
* download: Work around Guile small-receive-buffer bug.Ludovic Courtès2015-05-06
| | | | | | | | | | | | | | | | Previously, code using directly (guix build download) was still affected by <http://bugs.gnu.org/15368>. This includes source derivations, the 'guix download' command, and (guix gnu-maintenance). 'guix substitute' was unaffected since it used (guix http-client), which already had the fix. * guix/http-client.scm (open-socket-for-uri): Remove. (http-fetch): Remove #:buffered? argument to 'open-socket-for-uri'; use 'setvbuf' instead. * guix/scripts/substitute.scm (fetch): Likewise. * guix/build/download.scm (open-socket-for-uri): New procedure, taken from guix/http-client.scm, but without the #:buffered? parameter.
* http-client: Add workaround for HTTP pipelining on Guile <= 2.0.9.Ludovic Courtès2015-04-08
| | | | | | | Reported by Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>. * guix/http-client.scm (make-delimited-input-port): New procedure. Install it in (web response) for Guile <= 2.0.9.
* http-client: Monkey-patch 'make-chunked-input-port' on Guile <= 2.0.11.Ludovic Courtès2015-03-03
| | | | | | | | | | Fixes <http://bugs.gnu.org/19976>. * guix/http-client.scm (when-guile<=2.0.5): Rename to... (when-guile<=2.0.5-or-otherwise-broken): ... this. (%web-http): New variable. Monkey-patch 'make-chunked-input-port' when %WEB-HTTP defines 'read-chunk-body'.
* http-client: Update backport of chunked encoding support to Guile 2.0.5.Ludovic Courtès2015-03-03
| | | | | | | * guix/http-client.scm (read-chunk, read-chunk-body) [when-guile<=2.0.5]: Remove. (make-chunked-input-port) [when-guile<=2.0.5]: Update to Guile commit 00d3ecf2.
* download: Handle HTTP redirects to relative URI references.Mark H Weaver2015-02-19
| | | | | | | | | | | Fixes <http://bugs.gnu.org/19840>. Reported by Ricardo Wurmus <rekado@elephly.net>. * guix/build/download.scm: On Guile 2.0.11 or earlier, redefine the http "Location" header to accept relative URIs. (resolve-uri-reference): New exported procedure. (http-fetch): Use 'resolve-uri-reference' to resolve redirections. * guix/http-client.scm (http-fetch): Use 'resolve-uri-reference'
* download: Enlarge your receive buffer.Ludovic Courtès2014-05-23
| | | | | | | * guix/build/download.scm (open-connection-for-uri): Remove call to 'setsockopt'. * guix/http-client.scm (open-socket-for-uri)[rmem-max, buffer-size]: New variables. Add call to 'setsockopt'.
* substitute-binary: Gracefully handle HTTP GET errors.Ludovic Courtès2014-03-01
| | | | | | | * guix/http-client.scm (&http-get-error): New condition type. (http-fetch): Raise it instead of using 'error'. * guix/scripts/substitute-binary.scm (fetch) <http>: Wrap body into 'guard' form; gracefully handle 'http-get-error?' conditions.
* utils: Add `guile-version>?', and use it.Ludovic Courtès2013-08-23
| | | | | | | | | | | | | | This fixes Guile version comparisons when (version) has a vendor-specific suffix. Reported by Andreas Enge <andreas@enge.fr>. * guix/utils.scm (guile-version>?): New procedure. * tests/utils.scm ("guile-version>? 1.8", "guile-version>? 10.5"): New tests. * guix/scripts/substitute-binary.scm (fetch, progress-report-port): Use `guile-version>?' instead of `version>?'. * guix/http-client.scm (when-guile<=2.0.5, http-fetch): Likewise.
* Rename (guix web) to (guix http-client).Ludovic Courtès2013-07-14
* guix/web.scm: Rename to... * guix/http-client.scm: ... this. * guix/gnu-maintenance.scm, guix/scripts/substitute-binary.scm, Makefile.am, po/POTFILES.in: Update accordingly.