Commit Graph

8 Commits

Author SHA1 Message Date
Steven Leiva
266c436f18 selectRep chooses first rep if no matches found.
The `selectRep` documentation indicates that it choose the first
representation provided if no representation matches.

This was only partially correct, as `selectRep` required that no
representation matched **and** that the `Content-Type` header of the
response was empty.

This led to a problem because `defaultErrorhandler` relies on
`selectRep`, and when `selectRep` was unable to find a suitable
representation, it would "swallow" the original error that resulted in
`defaultErrorhandler` being called, and set a status 406 for all cases.
2018-07-19 21:32:02 -05:00
Michael Snoyman
3dc2d10b30 Compile with -Wall -Werror 2017-02-05 12:09:18 +02:00
Michael Snoyman
c19088d569 Switch yesod-core to use simpler dispatch 2014-03-04 13:46:03 +02:00
Michael Snoyman
16260f3e37 RouteAttrs (fixes #531) 2013-04-21 17:14:40 +03:00
Greg Weber
18be9bc206 accept header content negotiation
* look at wildcards */* and main/*
* return a 406 when nothing matches the accept header
2013-04-02 08:39:56 -07:00
Greg Weber
be04f4888b fix yesod-core auth response type for json 2013-04-02 08:27:30 -07:00
Michael Snoyman
1d0cac6e03 TypedContent 2013-03-11 10:45:01 +02:00
Michael Snoyman
d2f5ca449d selectRep/provideRep API 2013-03-11 09:08:34 +02:00