[hunchentoot-devel] Limit on Request Content Size

Hans Huebner hans.huebner at gmail.com
Mon Jan 5 12:38:27 UTC 2009


Happy New Year's, y'all!

On Wed, Dec 31, 2008 at 14:40, Volkan YAZICI <yazicivo at ttmail.com> wrote:
> Considering your comparison, implementing the limitation in stream
> structures could be great. In case of a limitation failure, hunchentoot
> can signal a (restartable) condition. But I don't have an idea about how
> I could make flexi-streams to force such a limitation while reading
> streams. Would you mind giving some hints, reading pointers, etc. that I
> can further study?

I did not investigate this much, but here are two hints:  The input
stream that Hunchentoot gets from usocket is eventually wrapped in a
flexi-stream.  Before doing so, the stream could be wrapped in an
instance of the length-limiting stream class that you have created.
The SBCL manual has some helpful documentation and examples on gray
streams, see (http://www.sbcl.org/manual/Gray-Streams.html).

Note that gray streams can be slow if you only supply methods for
character wise reading.  Things may still be fast enough, but you
should keep an eye on performance.

Let us know if you need further pointers.

-Hans




More information about the Tbnl-devel mailing list