You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Snap request bodies are InputStream ByteString (or similar) io-streams, and can't be consumed more than once (same issue as for the warp servant server: haskell-servant/servant#3). This can be fixed by, when a request body is consumed, building a new Request from the old and seeding it with a new io-stream build from the consumed ByteString.
This shouldn't be hard, but we will have to force a size limit on the request body (which we want to be configurable when the server starts, through the normal snap config machinery). We will need to use the request-building functions from an Internal module of snap-core, because this kind of request-monkeying is usually something snap users are supposed to avoid doing.
The text was updated successfully, but these errors were encountered:
Snap request bodies are
InputStream ByteString
(or similar) io-streams, and can't be consumed more than once (same issue as for the warp servant server: haskell-servant/servant#3). This can be fixed by, when a request body is consumed, building a new Request from the old and seeding it with a new io-stream build from the consumed ByteString.This shouldn't be hard, but we will have to force a size limit on the request body (which we want to be configurable when the server starts, through the normal snap config machinery). We will need to use the request-building functions from an Internal module of snap-core, because this kind of request-monkeying is usually something snap users are supposed to avoid doing.
The text was updated successfully, but these errors were encountered: