Document Snap workaround
This commit is contained in:
parent
a2e9955fe5
commit
1a2d637a4e
1 changed files with 3 additions and 0 deletions
|
@ -285,6 +285,9 @@ format fmt action = do
|
|||
serveAll :: IORef Counters -> Snap ()
|
||||
serveAll counters = do
|
||||
req <- getRequest
|
||||
-- Workaround: Snap still matches requests to /foo to this handler
|
||||
-- if the Accept header is "application/json", even though such
|
||||
-- requests ought to go to the 'serveOne' handler.
|
||||
unless (S.null $ rqPathInfo req) pass
|
||||
modifyResponse $ setContentType "application/json"
|
||||
gcStats <- liftIO Stats.getGCStats
|
||||
|
|
Loading…
Reference in a new issue