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

ASF GitHub Bot commented on CAMEL-12575:
----------------------------------------

GitHub user ramu11 opened a pull request:

    https://github.com/apache/camel/pull/2446

    CAMEL-12575:NPE on GET request with Content-Type header

    CAMEL-12575:NPE on GET request with Content-Type header

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ramu11/camel master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/camel/pull/2446.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2446
    
----
commit f967f06d029a3ae8f008d13fbe8a392f1e5706d2
Author: Ramu <kkakarla@...>
Date:   2018-07-31T12:10:45Z

    CAMEL-12575:NPE on GET request with Content-Type header

----


> camel-cxfrs: NPE on GET request with Content-Type header
> --------------------------------------------------------
>
>                 Key: CAMEL-12575
>                 URL: https://issues.apache.org/jira/browse/CAMEL-12575
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-cxfrs
>    Affects Versions: 2.21.1
>            Reporter: Chris Ribble
>            Assignee: Ramu
>            Priority: Major
>             Fix For: 2.21.3, 2.22.1, 2.23.0
>
>
> This commit  
> [https://github.com/apache/camel/commit/e4ad40f2eebb68cfde175b171538e26b278f63f6]
>  modified DefaultCxfRsBinding.populateCxfRsResponseFromExchange in a way that 
> causes an NPE on line #116 when a GET request is made with the Content-Type 
> header set. Since Camel copies the request headers into the response, this 
> causes the check for Content-Type to find the header and the code after that 
> assumes that cxfExchange.getOutMessage() is non-null.
> I can work around this by asking clients not to send the Content-Type header 
> (which is generally meaningless for a GET), but I cannot force them not to 
> send it. I think I can also add header filtering before the endpoint is 
> executed to strip the Content-Type header for GET requests, but ideally 
> DefaultCxfRsBinding.populateCxfRsResponseFromExchange would not call 
> cxfExchange.getOutMessage().putIfAbsent if getOutMessage returns null.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to