I wonder what's the best way to handle the case when a user tries to upload a very large file.
Basically we need to stop execution before it gets to the parse-rfc2388-form-data and report the problem to the user.

I can think of placing some function call inside request's constructor (defmethod initialize-instance :after ((request request) &rest init-args)
Something like:
(let* ((check (find-symbol "CHECK-FILE-SIZE" :your-package))
       (header-value (find-symbol "HEADER-VALUE" :drakma))
       (length (parse-integer (funcall header-value :content-length headers-in))))
     (funcall check length))

Inside function check-file-size you would raise an error if the file is too big.
The problem is that this error gets handled by the lisp debugger and I can't propagate it to the user.
Another thing, it's a dirty hack, what's the better way of doing this?

Thank you,
Andrew