[hunchentoot-devel] Problem with POST-PARAMETERS in multipart POSTs after r4438

Stephen Compall s11 at member.fsf.org
Fri Aug 21 03:28:55 UTC 2009


Hans Hübner <hans.huebner at gmail.com> writes:
> Peter, I have committed your fix to the development version of
> Hunchentoot.  Leslie, thank you for reviewing it!

As of r4438 (Peter's patch), I believe this wipes out post-parameters of
multipart/form-data POST requests and causes the relevant requests to
time out.

Specifically, on a multipart/form-data request, the first call to
`post-parameters` yields a sensible result, whereas future calls yield
NIL after timing out.

The solution proper is in the first hunk of the patch below, which
removes the ability to FORCE maybe-read-post-parameters to reread a
multipart/form-data request, because it can't do that, having emptied
the stream of the necessary data.

The second hunk, which incidentally fixes the problem as well (only by
avoiding the confusing behavior of maybe-read-post-parameters in the
common case of POSTing a non-empty set of parameters, rather than
solving it), is a specific followup to r4438, which in combination with
the first hunk merely prevents post-parameters from recalculating the
alist from the raw data on every call.

Were the first hunk to be changed to warn in the specific case it
avoids, the second hunk would also serve to eliminate spurious warnings
about being unable to reread multipart posts.  So I believe including
both would be ideal.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: hunchentoot-multipart-parms-4438.diff
Type: text/x-diff
Size: 1219 bytes
Desc: the patch
URL: <https://mailman.common-lisp.net/pipermail/tbnl-devel/attachments/20090820/77da559a/attachment.diff>
-------------- next part --------------

-- 
Sorry but you say Nibiru is a Hoax?  Doesnt Exist?  So maybe The
Sumerian people doesnt exist also! --Anonymous by way of SkI


More information about the Tbnl-devel mailing list