diff options
author | Christopher Baines <mail@cbaines.net> | 2023-05-11 09:59:17 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2023-05-11 09:59:17 +0100 |
commit | 7c2e1a716471ea832509076707941945ba94f053 (patch) | |
tree | 9396afafb8577dac921bd9694d409aac165127ae | |
parent | 6e320b29676f36c365274b63651559d1e2b2997c (diff) | |
download | build-coordinator-7c2e1a716471ea832509076707941945ba94f053.tar build-coordinator-7c2e1a716471ea832509076707941945ba94f053.tar.gz |
Add #:streaming? to call-with-streaming-http-request
-rw-r--r-- | guix-build-coordinator/utils.scm | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/guix-build-coordinator/utils.scm b/guix-build-coordinator/utils.scm index 3349ed4..6d921c6 100644 --- a/guix-build-coordinator/utils.scm +++ b/guix-build-coordinator/utils.scm @@ -311,7 +311,8 @@ content-length callback #:key (headers '()) - (method 'PUT)) + (method 'PUT) + streaming?) (with-port-timeouts (lambda () (let* ((port (open-socket-for-uri uri)) @@ -342,10 +343,13 @@ (force-output port) (let ((response (read-response port))) - (let ((body (read-response-body response))) - (close-port port) - (values response - body)))))))))) + (if streaming? + (values response + (response-body-port response)) + (let ((body (read-response-body response))) + (close-port port) + (values response + body))))))))))) (define (find-missing-substitutes-for-output store substitute-urls output) (if (valid-path? store output) |