Project: mesos
Issue MESOS-3739: Mesos does not set Content-Type for 400 Bad Request
While integrating with the HTTP Scheduler API I encountered the following scenario. The message below was serialized to protobuf and sent as the POST body {code:title=message} call { type: ACKNOWLEDGE, acknowledge: { uuid: , agentID: { value: "20151012-182734-16777343-5050-8978-S2" }, taskID: { value: "task-1" } } } {code} {code:title=Request Headers} POST /api/v1/scheduler HTTP/1.1 Content-Type: application/x-protobuf Accept: application/x-protobuf Content-Length: 73 Host: localhost:5050 User-Agent: RxNetty Client {code} I received the following response {code:title=Response Headers} HTTP/1.1 400 Bad Request Date: Wed, 14 Oct 2015 23:21:36 GMT Content-Length: 74 Failed to validate Scheduler::Call: Expecting 'framework_id' to be present {code} Even though my accept header made no mention of {{text/plain}} the message body returned to me is {{text/plain}}. Additionally, there is no {{Content-Type}} header set on the response so I can't even do anything intelligently in my response handler.
Story points: 2