summaryrefslogtreecommitdiff
path: root/guix/http-client.scm
AgeCommit message (Expand)Author
2017-05-03ui: Rename '_' to 'G_'....This avoids collisions with '_' when the latter is used as a 'match' pattern for instance. See <https://lists.gnu.org/archive/html/guix-devel/2017-04/msg00464.html>. * guix/ui.scm: Rename '_' to 'G_'. * po/guix/Makevars (XGETTEXT_OPTIONS): Adjust accordingly. * build-aux/compile-all.scm (warnings): Remove 'format'. * gnu/packages.scm, gnu/services.scm, gnu/services/shepherd.scm, gnu/system.scm, gnu/system/shadow.scm, guix/gnupg.scm, guix/http-client.scm, guix/import/cpan.scm, guix/import/elpa.scm, guix/import/pypi.scm, guix/nar.scm, guix/scripts.scm, guix/scripts/archive.scm, guix/scripts/authenticate.scm, guix/scripts/build.scm, guix/scripts/challenge.scm, guix/scripts/container.scm, guix/scripts/container/exec.scm, guix/scripts/copy.scm, guix/scripts/download.scm, guix/scripts/edit.scm, guix/scripts/environment.scm, guix/scripts/gc.scm, guix/scripts/graph.scm, guix/scripts/hash.scm, guix/scripts/import.scm, guix/scripts/import/cpan.scm, guix/scripts/import/cran.scm, guix/scripts/import/crate.scm, guix/scripts/import/elpa.scm, guix/scripts/import/gem.scm, guix/scripts/import/gnu.scm, guix/scripts/import/hackage.scm, guix/scripts/import/nix.scm, guix/scripts/import/pypi.scm, guix/scripts/import/stackage.scm, guix/scripts/lint.scm, guix/scripts/offload.scm, guix/scripts/pack.scm, guix/scripts/package.scm, guix/scripts/perform-download.scm, guix/scripts/publish.scm, guix/scripts/pull.scm, guix/scripts/refresh.scm, guix/scripts/size.scm, guix/scripts/substitute.scm, guix/scripts/system.scm, guix/ssh.scm, guix/upstream.scm: Use 'G_' instead of '_'. Most of this change was obtained by running: "sed -i -e's/(_ "/(G_ "/g' `find -name \*.scm`". Ludovic Courtès
2017-03-18http-client: Avoid name clash with 'open-connection-for-uri' in 2.2.0....* guix/build/download.scm (open-connection-for-uri): Add note about same-named binding in Guile 2.2.0. * guix/http-client.scm: Use 'guix:open-connection-for-uri' for the procedure coming from (guix build download). * guix/scripts/lint.scm: Likewise. * guix/scripts/substitute.scm: Likewise. Ludovic Courtès
2017-03-18build: Require Guile >= 2.0.9....* configure.ac: Bump requirement to 2.0.9. * doc/guix.texi (Requirements): Adjust accordingly. * README (Requirements): Likewise. * build-aux/download.scm: Remove workaround for <http://bugs.gnu.org/13095>. * guix/build/download.scm: Likewise. (http-fetch)[post-2.0.7?]: Remove. Remove conditional code for not POST-2.0.7?. * guix/http-client.scm: Remove workaround for <http://bugs.gnu.org/13095>. (http-fetch)[post-2.0.7?]: Remove. Remove conditional code for not POST-2.0.7?. * guix/serialization.scm (read-latin1-string): Remove mention of 2.0.9. * tests/nar.scm: Use (ice-9 control). (let/ec): Remove. Ludovic Courtès
2017-01-13http-client: Provide 'User-Agent' header by default....* guix/http-client.scm (http-fetch): Add #:headers parameter and honor it. Rename 'auth-header' to 'headers'. * guix/import/github.scm (json-fetch*): Add comment about required User-Agent. Ludovic Courtès
2017-01-10http-client: Improve error reporting....* guix/http-client.scm (http-fetch): Change message in &message condition to include URI, CODE, and the reason phrase. Ludovic Courtès
2016-11-12http-client: Add #:verify-certificate? to 'http-fetch'....* guix/http-client.scm (http-fetch): Add #:verify-certificate? parameter and pass it to 'open-connection-for-uri'. Ludovic Courtès
2016-10-19Use (ice-9 binary-ports) instead of (rnrs io ports)....This reduces the closure of (guix ui) from 123 to 106 modules. * guix/derivations.scm: Use (ice-9 binary-ports) instead of (rnrs io ports). (map-derivation)[substitute-file]: Use 'read-string' instead of 'get-string-all'. * guix/ftp-client.scm: Likewise. * guix/hash.scm: Likewise. * guix/http-client.scm: Likewise. * guix/pki.scm (ensure-acl, current-acl): Likewise. * guix/scripts/archive.scm (authorize-key)[read-key]: Likewise. * guix/scripts/authenticate.scm (read-canonical-sexp) (read-hash-data): Likewise. * guix/scripts/download.scm: Likewise. * guix/scripts/offload.scm (register-gc-root, remove-gc-roots) (send-files): Likewise. * guix/scripts/publish.scm (lazy-read-file-sexp): Likewise. * guix/scripts/refresh.scm: Likewise. * guix/scripts/substitute.scm (check-acl-initialized): Likewise. * guix/serialization.scm (read-maybe-utf8-string): Likewise. * guix/scripts/hash.scm (guix-hash): Use 'force-output' instead of 'flush-output-port'. * guix/store.scm (process-stderr): Likewise. * guix/tests.scm: Likewise. * guix/utils.scm: Use (ice-9 binary-ports) and autoload (rnrs io ports) for 'make-custom-binary-input-port'. Ludovic Courtès
2016-03-16http-client: No 'setvbuf' for non-file ports....* guix/http-client.scm (http-fetch): Do not call 'setvbuf' on non-file ports. Ludovic Courtès
2016-03-14http-client: Add #:keep-alive? parameter....* guix/http-client.scm (http-fetch): Add #:keep-alive? parameter and pass it to 'http-get' or 'http-get*'. Ludovic Courtès
2016-02-25http-client: 'http-client/cached' uses unique cache file names....* 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. Ludovic Courtès
2016-02-25http-client: 'http-fetch/cached' updates the cache atomically....* guix/http-client.scm (http-fetch/cached)[update-cache]: Use 'with-atomic-file-output' instead of 'call-with-output-file'. Ludovic Courtès
2016-01-06http-client: Work around <http://bugs.gnu.org/22273>....* guix/http-client.scm (read-header-line): New procedure. Use it. Ludovic Courtès
2016-01-06http-client: Fix erroneous comment....* guix/http-client.scm: Fix Guile version number in comment for Guile commit 5a10e41. Ludovic Courtès
2015-12-21http-client: Support basic authentication....* guix/http-client.scm (http-fetch): Add Authorization header to request when the URI contains userinfo. Ricardo Wurmus
2015-11-29http-client: 'http-fetch' converts strings to URIs....* guix/http-client.scm (http-fetch): Use 'string->uri' if URI is a string. Fixes a regression introduced in 8a5063f. Ludovic Courtès
2015-11-26http-client: 'http-fetch' and 'http-fetch/cached' support HTTPS....* guix/http-client.scm (http-fetch): Use 'open-connection-for-uri', to support HTTPS. Ludovic Courtès
2015-10-21http-client: '%http-cache-ttl' is really a parameter....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. Ludovic Courtès
2015-10-17http-client: Add 'http-fetch/cached'....* guix/utils.scm (cache-directory): New procedure. * guix/http-client.scm (%http-cache-ttl): New variable. (http-fetch/cached): New procedure. Ludovic Courtès
2015-09-26http-client: Backport Guile fix for 'read-chunk-header'....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. Ludovic Courtès
2015-09-10http-client: Backport delimited input port fix from Guile....* guix/http-client.scm (make-delimited-input-port): Backport Guile commit 5a10e41. Monkey-patch 'make-delimited-input-port' for any Guile <= 2.0.11. Ludovic Courtès
2015-09-10http-client: Remove redundant import clause....* guix/http-client.scm: Remove redundant #:use-module (guix utils). Ludovic Courtès
2015-05-10http-client: Remove monkey patching for 2.0.5....* guix/http-client.scm (read-response-body*): Remove. (http-fetch): Remove hacks for 2.0.5. Ludovic Courtès
2015-05-06download: Work around Guile small-receive-buffer bug....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. Ludovic Courtès
2015-04-08http-client: Add workaround for HTTP pipelining on Guile <= 2.0.9....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. Ludovic Courtès
2015-03-03http-client: Monkey-patch 'make-chunked-input-port' on Guile <= 2.0.11....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'. Ludovic Courtès
2015-03-03http-client: Update backport of chunked encoding support to Guile 2.0.5....* 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. Ludovic Courtès
2015-02-19download: Handle HTTP redirects to relative URI references....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' Mark H Weaver
2014-05-23download: Enlarge your receive buffer....* 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'. Ludovic Courtès
2014-03-01substitute-binary: Gracefully handle HTTP GET errors....* 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. Ludovic Courtès
2013-08-23utils: Add `guile-version>?', and use it....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. Ludovic Courtès
2013-07-14Rename (guix web) to (guix http-client)....* 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. Ludovic Courtès