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

Andres Oviedo updated CAMEL-17118:
----------------------------------
    Description: 
Hi team,

 

*Issue*

The parameter mapHttpMessageHeaders is not useful

 

*Root Issue*

If you have a request with a POST parameter having a CR/LF it will be mapped to 
Header, causing an Exception. CR/LF are not allowed header characters in HTTP 
protocol nor camel

 

*Analysis*

I think where the problem is.

Class:  org.apache.camel.http.common.DefaultHttpBindingComponent.java

Line: 
[https://github.com/apache/camel/blob/005765443f3161182b78c999b9f8b43052768800/components/camel-http-common/src/main/java/org/apache/camel/http/common/DefaultHttpBinding.java#L183]

 

+Explanation+:  The POST/GET parameters are always added as Headers in camel

There is no any flag that can avoid that mapping.

 

+Proposed solution+

Use the *mapHttpMessageFormUrlEncodedBody* to control where the GET/POST 
parameters should be mapped to headers

 

Kind regards

 

 

Kind regards

 

 

  was:
Hi team,

 

*Issue*

The parameter mapHttpMessageHeaders is not useful

 

*Root Issue*

If you have a request with a POST parameter having a CR/LF it will be mapped to 
Header, causing an Exception. CR/LF are not allowed in HTTP protocol nor camel

 

*Analysis*

I think where the problem is.

Class:  org.apache.camel.http.common.DefaultHttpBindingComponent.java

Line: 
[https://github.com/apache/camel/blob/005765443f3161182b78c999b9f8b43052768800/components/camel-http-common/src/main/java/org/apache/camel/http/common/DefaultHttpBinding.java#L183]

 

+Explanation+:  The POST/GET parameters are always added as Headers in camel

There is no any flag that can avoid that mapping.

 

+Proposed solution+

Use the *mapHttpMessageFormUrlEncodedBody* to control where the GET/POST 
parameters should be mapped to headers

 

Kind regards

 

 

Kind regards

 

 


> mapHttpMessageFormUrlEncodedBody does not work - it will always map the POST 
> parameters to headers
> --------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-17118
>                 URL: https://issues.apache.org/jira/browse/CAMEL-17118
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-servlet
>            Reporter: Andres Oviedo
>            Priority: Critical
>
> Hi team,
>  
> *Issue*
> The parameter mapHttpMessageHeaders is not useful
>  
> *Root Issue*
> If you have a request with a POST parameter having a CR/LF it will be mapped 
> to Header, causing an Exception. CR/LF are not allowed header characters in 
> HTTP protocol nor camel
>  
> *Analysis*
> I think where the problem is.
> Class:  org.apache.camel.http.common.DefaultHttpBindingComponent.java
> Line: 
> [https://github.com/apache/camel/blob/005765443f3161182b78c999b9f8b43052768800/components/camel-http-common/src/main/java/org/apache/camel/http/common/DefaultHttpBinding.java#L183]
>  
> +Explanation+:  The POST/GET parameters are always added as Headers in camel
> There is no any flag that can avoid that mapping.
>  
> +Proposed solution+
> Use the *mapHttpMessageFormUrlEncodedBody* to control where the GET/POST 
> parameters should be mapped to headers
>  
> Kind regards
>  
>  
> Kind regards
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to