[hunchentoot-devel] Preventing Hunchentoot from parsing the POST-Data

Christoph Senjak christoph.senjak at googlemail.com
Wed Oct 28 11:13:32 UTC 2009


Hello.

2009/10/28 Hans Hübner <hans.huebner at gmail.com>:
> On Wed, Oct 28, 2009 at 01:42, Christoph Senjak
> <christoph.senjak at googlemail.com> wrote:
>> Can I somehow tell hunchentoot not to read and parse the post-data,
>> but leaving raw-post-data as a binary stream which I can pass to the
>> cgi-handler?
>
> Hunchentoot is designed as terminating HTTP server, i.e. it does not
> expect to forward requests.  For this, it is required that any request
> body is eventually read from the stream during handler processing.
Hm. Ok, then I wonder why raw-post-data exists anyway.

> It
> should be possible to make request forwarding work, but that will
> require tracing the internals of Hunchentoot and finding out where and
> why the post body is actually read, then come up with a configurable
> mechanism to supress request body processing for certain requests.
To me it seems like this is done inside maybe-read-post-parameters,
which is called when using the post-parameters-slot-accessor. I dont
see any other part where this is called. But of course, I am not sure.
Modifying this function such that it doesnt read anything when - say -
some flag like (dont-read-post-data *request*) is set to T, should be
easy, but the question is if it is enough then to set it to T in the
handler-function itself, or if this has to be done in the dispatcher
already?

> Before sending patches, please make sure that you've read
> http://weitz.de/patches.html - You may also want to post your
> implementation plan here before submitting a patch.
Ok.

Regards, Christoph




More information about the Tbnl-devel mailing list