<commit_before>| title: Announcing: Snap Framework v0.4
| author: <NAME> <<EMAIL>>
| published: 2011-02-06T11:59:00-0500
| updated: 2011-02-06T11:59:00-0500
| summary: Release notes for Snap 0.4, a new major version of the Snap Framework.

The Snap team is proud to announce the release of Snap 0.4, containing a whole
bunch of nifty new features. Here is what we've been up to:


## New Features

  - Heist now uses the brand new
    [xmlhtml](http://hackage.haskell.org/package/xmlhtml) HTML5 parser for
    parsing and rendering templates. This eliminates our dependency on XML and
    makes it possible to include inline javascript/css in templates.  Check out
    Chris Smith's [blog
    post](http://cdsmith.wordpress.com/2011/02/05/html-5-in-haskell/) for more
    information about xmlhtml.

  - Along with the change to xmlhtml, we decided to convert Heist to use
    [Text](http://hackage.haskell.org/package/text) instead of
    [ByteString](http://hackage.haskell.org/package/bytestring). This is a
    backwards-incompatible change which breaks old code, but which we feel is
    the right thing to do.

  - Snap now has support for *file uploads* (!) and the `multipart/form-data`
    content type. Snap's file upload support uses iteratees to stream uploaded
    data and comes with a convenience function to writeuploaded files to a
    temporary directory. We put significant effort into preventing denial of
    service attacks and providing policy controls for things like maximum
    allowable file size, upload timeouts, minimum upload speed, etc.

  - The web server now uses
    [blaze-builder](http://hackage.haskell.org/package/text) in the output
    response body `Enumerator`.  Besides being significantly faster for most
    workloads than `ByteString` enumeration, this allowed us to save several
    copies within the server code, giving us a moderate performance<commit_msg>Fix wrong link<commit_after>| title: Announcing: Snap Framework v0.4
| author: <NAME> <<EMAIL>>
| published: 2011-02-06T11:59:00-0500
| updated: 2011-02-06T11:59:00-0500
| summary: Release notes for Snap 0.4, a new major version of the Snap Framework.

The Snap team is proud to announce the release of Snap 0.4, containing a whole
bunch of nifty new features. Here is what we've been up to:


## New Features

  - Heist now uses the brand new
    [xmlhtml](http://hackage.haskell.org/package/xmlhtml) HTML5 parser for
    parsing and rendering templates. This eliminates our dependency on XML and
    makes it possible to include inline javascript/css in templates.  Check out
    <NAME>'s [blog
    post](http://cdsmith.wordpress.com/2011/02/05/html-5-in-haskell/) for more
    information about xmlhtml.

  - Along with the change to xmlhtml, we decided to convert Heist to use
    [Text](http://hackage.haskell.org/package/text) instead of
    [ByteString](http://hackage.haskell.org/package/bytestring). This is a
    backwards-incompatible change which breaks old code, but which we feel is
    the right thing to do.

  - Snap now has support for *file uploads* (!) and the `multipart/form-data`
    content type. Snap's file upload support uses iteratees to stream uploaded
    data and comes with a convenience function to writeuploaded files to a
    temporary directory. We put significant effort into preventing denial of
    service attacks and providing policy controls for things like maximum
    allowable file size, upload timeouts, minimum upload speed, etc.

  - The web server now uses
    [blaze-builder](http://hackage.haskell.org/package/blaze-builder) in the
    output response body `Enumerator`.  Besides being significantly faster for
    most workloads than `ByteString` enumeration, this allowed us to save
    several copies within the server code, giving us a moderate performance
{'fraction_non_alphanumeric': 0.07414199633219806, 'fraction_numerical': 0.027246528687450876, 'mean_word_length': 3.7546699875467, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 8}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4256744', 'n_tokens_mistral': 1154, 'n_tokens_neox': 1036, 'n_words': 466}