diff options
author | Andreas Enge <andreas@enge.fr> | 2016-07-28 11:08:55 +0200 |
---|---|---|
committer | Andreas Enge <andreas@enge.fr> | 2016-07-28 11:08:55 +0200 |
commit | e309c7561043361afe63cc9435e620323f870a61 (patch) | |
tree | cd6fe073ba840bb68f446933ece44b45d8eb5ec7 /tests/publish.scm | |
parent | 1bb163b0dd07c8f2cfd7e91f1e428075cd3d5ed2 (diff) | |
parent | e335b82c4eba13fe873db2d680d399469931c10f (diff) | |
download | guix-e309c7561043361afe63cc9435e620323f870a61.tar guix-e309c7561043361afe63cc9435e620323f870a61.tar.gz |
Merge remote-tracking branch 'origin/master' into core-updates
Diffstat (limited to 'tests/publish.scm')
-rw-r--r-- | tests/publish.scm | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/publish.scm b/tests/publish.scm index 0ba33487bd..4dc807505c 100644 --- a/tests/publish.scm +++ b/tests/publish.scm @@ -58,8 +58,16 @@ (lambda (response body) body))) (define (http-get-port uri) - (call-with-values (lambda () (http-get uri #:streaming? #t)) - (lambda (response port) port))) + (let ((socket (open-socket-for-uri uri))) + ;; Make sure to use an unbuffered port so that we can then peek at the + ;; underlying file descriptor via 'call-with-gzip-input-port'. + (setvbuf socket _IONBF) + (call-with-values + (lambda () + (http-get uri #:port socket #:streaming? #t)) + (lambda (response port) + (setvbuf port _IONBF) + port)))) (define (publish-uri route) (string-append "http://localhost:6789" route)) |