in PARSE-HTTP-REQUEST: catch errors thrown by READ-RFC822-HEADERS and
answer 400 instead of 500 for requests with bad headers
This commit is contained in:
parent
0554b2d494
commit
36db985453
|
@ -243,7 +243,10 @@
|
||||||
(url (url-string->http-url request-uri))
|
(url (url-string->http-url request-uri))
|
||||||
(headers (if (equal? version '(0 . 9))
|
(headers (if (equal? version '(0 . 9))
|
||||||
'()
|
'()
|
||||||
(read-rfc822-headers (socket:inport sock)))))
|
(with-fatal-error-handler
|
||||||
|
(lambda (c decline)
|
||||||
|
(fatal-syntax-error "Illegal RFC 822 field syntax of request headers"))
|
||||||
|
(read-rfc822-headers (socket:inport sock))))))
|
||||||
(make-request meth request-uri url version headers sock)))))
|
(make-request meth request-uri url version headers sock)))))
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue