The Snap team is happy to announce the release of Snap 0.5.2, a bugfix release of the Snap Framework.

Bugfixes

  • Fixed issue #81, wherein a response body was not compressed if the Content-Type header field had a charset parameter.

  • Fixed issue #83, “Iteratees that throw exceptions aren’t handled properly”. This one, a combination of a bug in Snap and a bug in the enumerator (which has been fixed, thanks John!), was quite nasty: if the iteratee a user passed into runRequestBody threw an exception, it could cause the HTTP session to go out of frame, making the connection hang. Extra thanks to Bryan O’Sullivan for finding this bug and helping us reproduce it.

New features

Functions added

Added a function to Snap.Types:

terminateConnection :: (Exception e, MonadCatchIO m) => e -> m a

This function causes the HTTP connection to be immediately terminated. The exception generated is not catchable.

Dependency changes

  • We now require enumerator 0.4.13.1 or above, to fix a problem with enumerator’s catchError function.