diff options
author | Christopher Baines <mail@cbaines.net> | 2023-03-21 12:45:12 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2023-03-21 12:59:43 +0000 |
commit | 3a11b724f62cc863e8e5b09faf2171ff41b1de18 (patch) | |
tree | a75ec1c494da8d3140dd150403590dabdb4ec3ed /guix-build-coordinator | |
parent | 36477113fd935b108b64477d0e1e063111eae3da (diff) | |
download | build-coordinator-3a11b724f62cc863e8e5b09faf2171ff41b1de18.tar build-coordinator-3a11b724f62cc863e8e5b09faf2171ff41b1de18.tar.gz |
Stop using procedures for responses where unnecessary
In newer versions of Guile Fibers, this would mean that chunked transport
encoding is used, which is unnecessary for small quick respones.
Diffstat (limited to 'guix-build-coordinator')
-rw-r--r-- | guix-build-coordinator/agent-messaging/http/server.scm | 6 | ||||
-rw-r--r-- | guix-build-coordinator/client-communication.scm | 3 |
2 files changed, 3 insertions, 6 deletions
diff --git a/guix-build-coordinator/agent-messaging/http/server.scm b/guix-build-coordinator/agent-messaging/http/server.scm index c3cf391..4741c31 100644 --- a/guix-build-coordinator/agent-messaging/http/server.scm +++ b/guix-build-coordinator/agent-messaging/http/server.scm @@ -129,8 +129,7 @@ port. Also, the port used can be changed by passing the --port option.\n" #:headers (append extra-headers '((content-type . (application/json)) (vary . (accept))))) - (lambda (port) - (scm->json json port)))) + (scm->json-string json))) (define* (render-text text #:key (extra-headers '()) (code 200)) @@ -139,8 +138,7 @@ port. Also, the port used can be changed by passing the --port option.\n" #:headers (append extra-headers '((content-type . (text/plain)) (vary . (accept))))) - (lambda (port) - (display text port)))) + text)) (define (no-content) (list (build-response #:code 204) diff --git a/guix-build-coordinator/client-communication.scm b/guix-build-coordinator/client-communication.scm index 937b679..698a62e 100644 --- a/guix-build-coordinator/client-communication.scm +++ b/guix-build-coordinator/client-communication.scm @@ -543,8 +543,7 @@ #:headers (append extra-headers '((content-type . (application/json)) (vary . (accept))))) - (lambda (port) - (scm->json json port)))) + (scm->json-string json))) (define* (send-request coordinator-uri method |