[hunchentoot-devel] Fwd: Problem with late calls to POST-PARAMETERS

Peter Seibel peter at gigamonkeys.com
Wed Jul 22 14:47:09 UTC 2009


I think the actual problem I had was some code that did essentially:

  (with-foo-output ((send-headers))
     (expand-template-file))

where expand-template-file calls code that uses post-parameters to get
at, well, post parameters. It's not clear how to easily turn that code
inside out so all the parameters are gathered in advance of calling
send-headers.

-Peter

On Wed, Jul 22, 2009 at 7:44 AM, Peter Seibel<peter at gigamonkeys.com> wrote:
> On Wed, Jul 22, 2009 at 7:33 AM, Leslie P.
> Polzer<sky at viridian-project.de> wrote:
>>
>> Peter Seibel wrote:
>>> Because I didn't call RAW-POST-DATA; it was called by the Hunchentoot
>>> internals when I called SEND-HEADERS. And after that without my patch
>>> you can no longer get anything via POST-PARAMETERS. I don't see any
>>> reason that calling SEND-HEADERS should make it impossible to get at
>>> POST-PARAMETERS (and pre-1.0 it didn't which is how I ran into this
>>> problem--my previously working code stopped working when I upgraded to
>>> 1.0)
>>
>> I see. So is there a pressing reason to call SEND-HEADERS before
>> collecting post parameters?
>
> Well, a big pile of previously working code. And if you're not allowed
> to call POST-PARAMETERS after SEND-HEADERS then the docs should say
> so. So is it easier to patch the code to allow the old (and sometimes
> useful behavior) or patch the docs to reflect a somewhat arbitrary
> restriction?
>
> -Peter
>
>
> --
> Peter Seibel
> http://www.codersatwork.com/
> http://www.gigamonkeys.com/blog/
>



-- 
Peter Seibel
http://www.codersatwork.com/
http://www.gigamonkeys.com/blog/




More information about the Tbnl-devel mailing list