You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Anand Mazumdar (JIRA)" <ji...@apache.org> on 2016/07/25 22:59:20 UTC
[jira] [Updated] (MESOS-5858) Operator API should accept the
request with charset specified in Content-Type
[ https://issues.apache.org/jira/browse/MESOS-5858?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Anand Mazumdar updated MESOS-5858:
----------------------------------
Shepherd: Anand Mazumdar
> Operator API should accept the request with charset specified in Content-Type
> -----------------------------------------------------------------------------
>
> Key: MESOS-5858
> URL: https://issues.apache.org/jira/browse/MESOS-5858
> Project: Mesos
> Issue Type: Bug
> Reporter: zhou xing
> Assignee: Abhishek Dasgupta
> Priority: Minor
>
> When requesting from client like WebUI, the Content-Type of the request maybe set to
> ```application/json; charset=utf-8```
> , the request will get 415 response code with message
> ```Expecting 'Content-Type' of application/json or application/x-protobuf```
> The following code in http.cpp just compare the content-type of the request directly with “application/json” or “application/x-protobuf”:
> ```...
> if (contentType.get() == APPLICATION_PROTOBUF) {
> if (!v1Call.ParseFromString(request.body)) {
> return BadRequest("Failed to parse body into Call protobuf");
> }
> } else if (contentType.get() == APPLICATION_JSON) {
> …
> We need to accept a request with charset set in Content-Type
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)