pgte/nock — pull request #176 by jbergknoff (2014-05-20 18:39:00+00:00)
Title: Don't add "application/json" content type to blank response

Under [various conditions](https://github.com/pgte/nock/blob/master/lib/scope.js#L83-L97), `nock` injects a content-type header with value `application/json`. This was introduced in [this commit](https://github.com/pgte/nock/commit/879d0290743ceae2dafebc488fa048ae3174abb1).

One case that causes issues for me is when I don't specify a response body: `nock` adds the header and then `needle` attempts to parse the blank response as JSON (because of the header).

I consider it a mistake to add this header behind the user's back. I recommend removing it altogether. Nevertheless, this patch just adds a special case for an empty response (and relevant test).