aboutsummaryrefslogtreecommitdiff
path: root/guix-build-coordinator/agent-messaging/http.scm
diff options
context:
space:
mode:
Diffstat (limited to 'guix-build-coordinator/agent-messaging/http.scm')
-rw-r--r--guix-build-coordinator/agent-messaging/http.scm12
1 files changed, 10 insertions, 2 deletions
diff --git a/guix-build-coordinator/agent-messaging/http.scm b/guix-build-coordinator/agent-messaging/http.scm
index 9a2732d..01a2c15 100644
--- a/guix-build-coordinator/agent-messaging/http.scm
+++ b/guix-build-coordinator/agent-messaging/http.scm
@@ -281,7 +281,8 @@
(lambda* (build-id output-name file
#:key
(log default-log)
- reporter)
+ reporter
+ report-bytes-hashed)
(define file-size
(stat:size (stat file)))
@@ -377,7 +378,14 @@
#:reporter reporter)))
#:binary #t)))
#:headers `((Authorization . ,auth-value))
- #:method (if bytes 'POST 'PUT))))
+ #:method (if bytes 'POST 'PUT)
+ #:streaming? #t)))
+
+ (let loop ((line (get-line body)))
+ (unless (eof-object? line)
+ (report-bytes-hashed
+ (string->number line))
+ (loop (get-line body))))
(log 'DEBUG "perform upload " file ", response code: "
(response-code response))