[ 
https://issues.apache.org/jira/browse/MESOS-5858?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15386353#comment-15386353
 ] 

Abhishek Dasgupta commented on MESOS-5858:
------------------------------------------

RR:
https://reviews.apache.org/r/50246/
https://reviews.apache.org/r/50249/

cc: [~dongdong] Please check if it meets your requirements.


> 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)

Reply via email to