[hunchentoot-devel] Limit on Request Content Size

Hans Huebner hans.huebner at gmail.com
Tue Dec 30 14:53:40 UTC 2008


On Tue, Dec 30, 2008 at 14:58, Volkan YAZICI <yazicivo at ttmail.com> wrote:
> How can I force a limit on the content size of the request body? Is
> there such a functionality built into hunchentoot? If not, is
> GET-POST-DATA the right place to introduce this feature?

I don't think that Hunchentoot can support a body size limitation in a
meaningful way without major refactoring GET-POST-DATA.  The
WANT-STREAM argument to GET-POST-DATA, chunking and HTTP/0.9 support
together make it impossible to enfore the limit in a fashion that
would handle all use cases within the existing framework of the
GET-POST-DATA function.

We are not quite happy with that situation, not only because there is
no limit on the incoming request body, but also because of the RFC2388
parser that does not understand encodings.  I am not sure whether
we'll have the time to fix the problem ourselves soon, so if you can
come up with a patch, we might be able to review and incorporate it
into the upcoming release.

Please make sure that you read http://weitz.de/patches.html before you
start.  It might be good to discuss the implementation strategy here
beforehand.

One approach would be to implement the limitation in a gray stream -
That way, it may be possible to get away without changing the existing
structure too much, but I have not investigated the possibility very
deeply.

-Hans




More information about the Tbnl-devel mailing list