[hunchentoot-devel] Preventing users to upload too big files

Hans Hübner hans at huebner.org
Sun Sep 14 07:14:36 UTC 2008


On Sun, Sep 14, 2008 at 00:55, Andrei Stebakov <lispercat at gmail.com> wrote:
> 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.
>[...]
> Another thing, it's a dirty hack, what's the better way of doing this?

I would fix the problem in RFC2388:READ-UNTIL-NEXT-BOUNDARY.  This
function should read the data directly to the stream provided, and it
should have a special variable (in the RFC2388 package) that can be
set to limit the maximum number of bytes read.

-Hans



More information about the Tbnl-devel mailing list