1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-09 13:30:26 +02:00

http: Support CONNECT and PATCH HTTP methods.

PATCH is described by RFC 5789 and CONNECT is described by RFC 7231.

* module/web/http.scm (parse-http-method): Support CONNECT and PATCH.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Christopher Baines 2020-04-10 18:09:43 +01:00 committed by Ludovic Courtès
parent 922c3bd55c
commit ac5df66f1c

View file

@ -1108,6 +1108,8 @@ symbol, like GET."
((string= str "DELETE" start end) 'DELETE)
((string= str "OPTIONS" start end) 'OPTIONS)
((string= str "TRACE" start end) 'TRACE)
((string= str "CONNECT" start end) 'CONNECT)
((string= str "PATCH" start end) 'PATCH)
(else (bad-request "Invalid method: ~a" (substring str start end)))))
(define* (parse-request-uri str #:optional (start 0) (end (string-length str)))