[ 
https://issues.apache.org/jira/browse/CAMEL-3666?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Fernando Ribeiro updated CAMEL-3666:
------------------------------------

    Description: 
As per section 7.2.1 of RFC 2616, ??any HTTP/1.1 message containing an 
entity-body SHOULD [not MUST] include a Content- Type header field defining the 
media type of that body??.

The populateExchangeFromRestletRequest method of the DefaultRestletBinding 
class, unlike others in the same class, needs to be changed:

{code:Java}if 
(request.getEntity().getMediaType().equals(MediaType.APPLICATION_WWW_FORM)) {
  ...
} else {
  inMessage.setBody(request.getEntity().getStream());
}{code}

  was:
As per section 7.2.1 of RFC 2616, ?? any HTTP/1.1 message containing an 
entity-body SHOULD [not MUST] include a Content- Type header field defining the 
media type of that body ??.

The populateExchangeFromRestletRequest method of the DefaultRestletBinding 
class, unlike others in the same class, needs to be changed:

{code:Java}if 
(request.getEntity().getMediaType().equals(MediaType.APPLICATION_WWW_FORM)) {
  ...
} else {
  inMessage.setBody(request.getEntity().getStream());
}{code}


> Make Content-Type Optional
> --------------------------
>
>                 Key: CAMEL-3666
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3666
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-restlet
>    Affects Versions: 2.6.0
>            Reporter: Fernando Ribeiro
>             Fix For: 2.7.0
>
>
> As per section 7.2.1 of RFC 2616, ??any HTTP/1.1 message containing an 
> entity-body SHOULD [not MUST] include a Content- Type header field defining 
> the media type of that body??.
> The populateExchangeFromRestletRequest method of the DefaultRestletBinding 
> class, unlike others in the same class, needs to be changed:
> {code:Java}if 
> (request.getEntity().getMediaType().equals(MediaType.APPLICATION_WWW_FORM)) {
>   ...
> } else {
>   inMessage.setBody(request.getEntity().getStream());
> }{code}

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to