mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
remove redundant error-handling block
* module/web/server/http.scm (http-read): No need for a call-with-error-handling block here, as the read impl is itself within an error-handling block.
This commit is contained in:
parent
e6ae317306
commit
35b97af9d6
1 changed files with 7 additions and 16 deletions
|
@ -26,8 +26,7 @@
|
|||
#:use-module (web request)
|
||||
#:use-module (web response)
|
||||
#:use-module (web server)
|
||||
#:use-module (ice-9 poll)
|
||||
#:use-module (system repl error-handling))
|
||||
#:use-module (ice-9 poll))
|
||||
|
||||
|
||||
(define (make-default-socket family addr port)
|
||||
|
@ -106,20 +105,12 @@
|
|||
;; Otherwise, try to read a request from this port.
|
||||
;; Record the next index.
|
||||
(set-http-poll-idx! server (1- idx))
|
||||
(call-with-error-handling
|
||||
(lambda ()
|
||||
(let ((req (read-request port)))
|
||||
;; Block buffering for reading body and writing response.
|
||||
(setvbuf port _IOFBF)
|
||||
(values port
|
||||
req
|
||||
(read-request-body/latin-1 req))))
|
||||
#:pass-keys '(quit interrupt)
|
||||
#:on-error (if (batch-mode?) 'pass 'debug)
|
||||
#:post-error
|
||||
(lambda (k . args)
|
||||
(warn "Error while reading request" k args)
|
||||
(values #f #f #f))))))))))))
|
||||
(read-request-body/latin-1 req))))))))))))
|
||||
|
||||
(define (keep-alive? response)
|
||||
(let ((v (response-version response)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue