pengwynn/faraday_middleware — pull request #33 by twinturbo (2012-04-04 18:59:32+00:00)
Title: Make JSON middleware work with HEAD responses

If your controllers respond_to json and you use head, then this middleware fails.

Here is an example response from my API:

```
http://api.radium.io:80/> POST /services/push
... {"channel": "/foo", "data": "bar"}
HTTP/1.1 200 OK
Cache-Control: max-age=0, private, must-revalidate
Content-Type: application/json; charset=utf-8
Date: Wed, 04 Apr 2012 16:13:53 GMT
Etag: "7215ee9c7d9dc229d2921a40e899ec5f"
Server: thin 1.3.1 codename Triple Espresso
X-Rack-Cache: invalidate, pass
X-Request-Id: a6eee15457c634b198fdc371d078cbdf
X-Runtime: 0.009914
X-Ua-Compatible: IE=Edge,chrome=1
Content-Length: 1
Connection: keep-alive

```