hapijs/hapi — pull request #2277 by kanongil (2014-12-11 15:17:05+00:00)
Title: Fix invalid response for empty reply() (v8.x regression)

The `content-type` header for empty responses used to not be set when calling `reply(null)`, `reply('')`, etc.

In 8.0 the header is set as `application/json`. This is a problem, as an empty string _is not_ valid JSON, causing eg. `$.ajax()` to cast a `TypeError` when in JSON mode.

This patch changes the `content-type` to plain `text/html` for empty responses, which _is_ valid.