summaryrefslogtreecommitdiff
path: root/guix/web.scm
Commit message (Collapse)AuthorAge
* substitute-binary: Pass `filtered-port' an unbuffered port.Ludovic Courtès2013-05-15
| | | | | | | | | | | | | | | | | | This fixes a bug whereby `read-response' would read more than just the response, with the extra data going into the port's buffer; the "bzip2 -dc" process spawned by `filtered-port' would not see the those buffered data, which are definitely lost, and would bail out with "bzip2: (stdin) is not a bzip2 file." * guix/utils.scm (filtered-port): Document that INPUT must be unbuffered. * guix/web.scm (http-fetch): Add `buffered?' parameter. Call `open-socket-for-uri' explicitly, and call `setvbuf' when BUFFERED? is false. Pass the port to `http-get'. Close it upon 301/302. * guix/scripts/substitute-binary.scm (fetch): Add `buffered?' parameter. Pass it to `http-fetch'; honor it for `file' URIs. (guix-substitute-binary): Call `fetch' with #:buffered? #f for port RAW. * tests/utils.scm ("filtered-port, file"): Open FILE as unbuffered.
* web: Add workaround for <http://bugs.gnu.org/13095>.Ludovic Courtès2013-04-27
| | | | * guix/web.scm: Add workaround for <http://bugs.gnu.org/13095>.
* web: Add 2.0.5 workaround for responses without content-length.Ludovic Courtès2013-04-27
| | | | | | * guix/web.scm (read-response-body*)[when-guile<=2.0.5]: Support responses without content-length. Reported by Andreas Enge <andreas@enge.fr>.
* web: Backport chunked encoding support for Guile <= 2.0.5.Ludovic Courtès2013-04-27
| | | | | | | | * guix/web.scm (when-guile<=2.0.5): New macro. (read-chunk-header, read-chunk, read-chunk-body, make-chunked-input-port, read-response-body*)[when-guile<=2.0.5]: New procedures. (http-fetch): Clarify message when (not data).
* web: Factorize `http-get' hackery.Ludovic Courtès2013-04-25
This should fix `substitute-binary --query' on Guile 2.0.5. * guix/web.scm: New file. * Makefile.am (MODULES): Add it. * po/POTFILES.in: Add it. * guix/gnu-maintenance.scm (http-fetch): Remove. (%package-list-url): Turn into a URI. (official-gnu-packages): Add #:text? #t to `http-fetch' call. * guix/scripts/substitute-binary.scm (fetch): Remove `http' case, and use `http-fetch' instead.