diff options
author | Christopher Baines <mail@cbaines.net> | 2023-05-05 19:20:57 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2023-05-05 20:17:52 +0100 |
commit | babee95acd23105e1fcfa5dc0bb1f90bcd10d07e (patch) | |
tree | 8a714b32aaa227b446d5caae4dfbed1b31334a59 | |
parent | 093af3f90b986cb3f3dc387e307b6e08b09a1c9f (diff) | |
download | build-coordinator-babee95acd23105e1fcfa5dc0bb1f90bcd10d07e.tar build-coordinator-babee95acd23105e1fcfa5dc0bb1f90bcd10d07e.tar.gz |
Add some comments about streaming http requests
-rw-r--r-- | guix-build-coordinator/agent-messaging/http.scm | 11 |
1 files changed, 11 insertions, 0 deletions
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) |