mesosphere/marathon — pull request #351 by ssorallen (2014-06-24 19:52:09+00:00)
Title: Remove `Content-Length` header for valid JSON response

Set content to `None` so the response does not set a `Content-Length`
header with value 0, which would tell clients to parse the body as JSON.
An empty string (response body with length 0) is invalid JSON.

Response before this change:

HTTP/1.1 201 Created
Location: http://localhost:8080/v2/apps/app-1234
Content-Type: application/json
Content-Length: 0
Server: Jetty(8.y.z-SNAPSHOT)

Response after this change:

HTTP/1.1 201 Created
Location: http://localhost:8080/v2/apps/app-12345
Content-Type: application/json
Transfer-Encoding: chunked
Server: Jetty(8.y.z-SNAPSHOT)

Fixes #349.