weavejester/ring-anti-forgery — pull request #6 by jszakmeister (2012-05-01 18:06:00+00:00)
Title: Don't try to add a cookie to a nil response.

When trying to use this with Noir, I discovered that wrap-anti-forgery was creating a response map even when the response from the underlying handler was nil. I brought this up on the Noir list, and Chris Granger said to file a pull request here. The thread on the Noir list is [here](https://groups.google.com/forum/?fromgroups#!topic/clj-noir/KMtNMu8F6vg).

I originally had a check in ``assoc-token-cookie`` for a nil response, but I moved it to ``wrap-anti-forgery`` to keep from unnecessarily generating a new token. Especially since that could consume valuable entropy.

I also added a test for this scenario too. Let me know if there's anything you need me to do!