Files
CLASH/src/main/method.cl
Pierre R. Mai 5c57e50d07 Extensive rewrite of parsing routines, most parsable headers in
requests and entities are now parsed.  Furthermore the whole
request-entity handling has been changed to allow lazy parsing, parsed
entity headers, and flexible choice of entities.  This is all to
support the handling of MIME multipart entities, especially
multipart/form-data.  The current revision is a first cut, and some
further rewrites are needed.
2001-03-27 14:00:34 +00:00

26 lines
768 B
Common Lisp

;;;; CLASH --- The Common Lisp Adaptable Simple HTTP server
;;;; This is copyrighted software. See documentation for terms.
;;;;
;;;; method.cl --- HTTP Request Method registry
;;;;
;;;; Checkout Tag: $Name$
;;;; $Id$
(in-package :CLASH)
;;;; %File Description:
;;;;
;;;;
;;;;
(defconstant +maximum-safe-http-method-length+ 80
"This defines the limit we impose on HTTP method names acceptable to
`get-method-symbol', in order to avoid interning huge stuff into the
keyword package, and thereby leaking non-negligible amounts of
memory.")
(defun get-method-symbol (method-string)
(when (> (length method-string) +maximum-safe-http-method-length+)
(error 'clash-error :code +http-code-bad-request+))
(intern method-string (symbol-package :initarg)))