Stephen P. Compall's patch to fix problems with multipart/form-data request
commit8d2848e1baf357873ed8e5df128d505b9b7e5dcd
authorHans Hübner <hans.huebner@gmail.com>
Fri, 21 Aug 2009 12:40:26 +0000 (21 12:40 +0000)
committerHans Hübner <hans.huebner@gmail.com>
Fri, 21 Aug 2009 12:40:26 +0000 (21 12:40 +0000)
tree337402009155050cf5ccfa910d9192b6487fc71b
parentb4667f70f0a061a6a47ace23cf4835f64be93b3c
Stephen P. Compall's patch to fix problems with multipart/form-data request
bodies:

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.
request.lisp