aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--guix-build-coordinator/agent-messaging/http/server.scm24
1 files changed, 0 insertions, 24 deletions
diff --git a/guix-build-coordinator/agent-messaging/http/server.scm b/guix-build-coordinator/agent-messaging/http/server.scm
index 0f3faac..736c1db 100644
--- a/guix-build-coordinator/agent-messaging/http/server.scm
+++ b/guix-build-coordinator/agent-messaging/http/server.scm
@@ -49,30 +49,6 @@
#:use-module (guix-build-coordinator coordinator)
#:export (http-agent-messaging-start-server))
-(define (bad-request message . args)
- (throw 'bad-request message args))
-
-(define (fixed/read-request-body r)
- "Reads the request body from R, as a bytevector. Return ‘#f’
-if there was no request body."
- (cond
- ((member '(chunked) (request-transfer-encoding r))
- (make-chunked-input-port* (request-port r)
- ;; closing the port is handled elsewhere
- #:keep-alive? #t))
- (else
- (let ((nbytes (request-content-length r)))
- (and nbytes
- (let ((bv (get-bytevector-n (request-port r) nbytes)))
- (if (= (bytevector-length bv) nbytes)
- bv
- (bad-request "EOF while reading request body: ~a bytes of ~a"
- (bytevector-length bv) nbytes))))))))
-
-(module-set! (resolve-module '(web request))
- 'read-request-body
- fixed/read-request-body)
-
(define (http-agent-messaging-start-server port host secret-key-base
build-coordinator
chunked-request-channel)