[web-devel] [Yesod] Next version of WAI: cleaning house

Greg Weber greg at gregweber.info
Thu Jul 25 20:06:08 CEST 2013


When a request hits a handler, it will already have gone through the
middleware, so it only seems possible to alter how the response is handled
at that point.
If you want different middleware for different routes, that is something
that must be handled at the routing level, so it seems out of the scope of
WAI.

But if you explain your use case on the Yesod mail list we can try and come
up with a more convenient solution.
I do have a WAI middleware that checks routes that might benefit from this.


On Thu, Jul 25, 2013 at 10:20 AM, Robert Lee <robert.lee at chicago.vc> wrote:

> Is it possible in the present design to change middleware modules at the
> level of a handler?
>
> On Tue, 2013-07-23 at 13:04 +0300, Michael Snoyman wrote:
> > Some of you may have seen the brief interchange between Kazu and
> > myself regarding ResourceT in WAI. Let me give a very brief synopsis
> > of the situation:
> >       * In order to allow WAI applications to acquire scarce resources
> >         like file handles in an exception-safe way, WAI actions all
> >         live
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Yesod Web Framework" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to yesodweb+unsubscribe at googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/web-devel/attachments/20130725/eee44fbc/attachment.htm>


More information about the web-devel mailing list