[web-devel] [Yesod] setUltDest' lost query param, it's right thing?
Michael Snoyman
michael at snoyman.com
Mon Dec 20 18:06:22 CET 2010
This is the intended behavior, though I can appreciate what you're
asking for. Basically, it's not necessarily a good idea to
automatically resend POST parameters, since a POST operation is not
idempotent (ie, POST changes things), and we should follow the HTTP
standard on when things should change.
In theory, we could create alternative setUltDest-style functions that
also set the POST parameters, though we would also need to do
something about indicating that the request should be treated as a
POST rather than GET request after redirect. This may come back to
re-introducing the MethodOverride middleware, which is something Nubis
and I were discussing.
Michael
2010/12/20 いとうかつとし <cutsea110 at gmail.com>:
> setUltDest' which used in redirectLogin(which is called from requireAuth)
> set session reqGetParams, but not postParams.
> This means that , if there are a code as below, posted parameters are lost,
> aren't these?
> postFooR :: Handler RepHtml
> postFooR = do
> (uid,_) <- requireAuth
> (x, y) <- uncurry (liftM2 (,)) (lookupPostParam "x", lookupPostParam "y")
> ....
> defaultLayout $ do
> ....
> ....
>
> _______________________________________________
> web-devel mailing list
> web-devel at haskell.org
> http://www.haskell.org/mailman/listinfo/web-devel
>
>
More information about the web-devel
mailing list