From babee95acd23105e1fcfa5dc0bb1f90bcd10d07e Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Fri, 5 May 2023 19:20:57 +0100 Subject: Add some comments about streaming http requests --- guix-build-coordinator/agent-messaging/http.scm | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'guix-build-coordinator/agent-messaging/http.scm') diff --git a/guix-build-coordinator/agent-messaging/http.scm b/guix-build-coordinator/agent-messaging/http.scm index d3e4fcd..7a56520 100644 --- a/guix-build-coordinator/agent-messaging/http.scm +++ b/guix-build-coordinator/agent-messaging/http.scm @@ -379,6 +379,12 @@ ""))))) (let-values (((response body) + ;; TODO This chunks the transfer, but it + ;; doesn't need to since the length of the + ;; body is known. The chunking is useful + ;; however, as it matches up with the + ;; read-request-body hack to avoid reading + ;; the entire request body in to memory. (call-with-streaming-http-request upload-uri (lambda (port) @@ -447,6 +453,11 @@ (retry-on-error (lambda () (let-values (((response body) + ;; TODO This chunks the transfer, but it doesn't need to + ;; since the length of the body is known. The chunking + ;; is useful however, as it matches up with the + ;; read-request-body hack to avoid reading the entire + ;; request body in to memory. (call-with-streaming-http-request uri (lambda (request-port) -- cgit v1.2.3