[jira] [Commented] (CAMEL-12787) Accept header is not respected anymore in CXFRS consumer when POST

2018-09-10 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on CAMEL-12787:


Github user oscerd closed the pull request at:

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


> Accept header is not respected anymore in CXFRS consumer when POST
> --
>
> Key: CAMEL-12787
> URL: https://issues.apache.org/jira/browse/CAMEL-12787
> Project: Camel
>  Issue Type: Bug
>  Components: camel-cxfrs
>Affects Versions: 2.21.1, 2.21.2, 2.22.0, 2.22.1
>Reporter: Xilai Dai
>Assignee: Andrea Cosentino
>Priority: Major
> Fix For: 2.21.3, 2.22.2, 2.23.0
>
>
> Given the camel route as a cxfrs server (test case is here: 
> https://github.com/xldai/test/tree/master/cxfrs), Running the Route and send 
> POST request from curl with "Accept: application/json", but the cxfrs server 
> will always return  application/xml as Response.
> Note this issue only happening on POST method, for GET, the Accept header is 
> respected.
> No this kind of issue on Camel 2.20.x, Camel 2.21.0.



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


[jira] [Commented] (CAMEL-12787) Accept header is not respected anymore in CXFRS consumer when POST

2018-09-10 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on CAMEL-12787:


oscerd closed pull request #2513: fix CAMEL-12787 Accept header is not 
respected anymore in CXFRS consu…
URL: https://github.com/apache/camel/pull/2513
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/DefaultCxfRsBinding.java
 
b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/DefaultCxfRsBinding.java
index 1ae15e91fe3..8679bba6894 100644
--- 
a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/DefaultCxfRsBinding.java
+++ 
b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/DefaultCxfRsBinding.java
@@ -115,7 +115,7 @@ public Object populateCxfRsResponseFromExchange(Exchange 
camelExchange,
 if (response.getHeader(Exchange.HTTP_RESPONSE_CODE) != null && 
!cxfExchange.containsKey(org.apache.cxf.message.Message.RESPONSE_CODE)) {
 cxfExchange.put(org.apache.cxf.message.Message.RESPONSE_CODE, 
response.getHeader(Exchange.HTTP_RESPONSE_CODE, Integer.class));
 }
-if (response.getHeader(Exchange.CONTENT_TYPE) != null) {
+if (response.getHeader(Exchange.CONTENT_TYPE) != null && 
!cxfExchange.containsKey(org.apache.cxf.message.Message.CONTENT_TYPE)) {
 if (!ObjectHelper.isEmpty(cxfExchange) && 
!ObjectHelper.isEmpty(cxfExchange.getOutMessage())) {
 
cxfExchange.getOutMessage().putIfAbsent(org.apache.cxf.message.Message.PROTOCOL_HEADERS,
 
 new 
TreeMap<>(String.CASE_INSENSITIVE_ORDER));


 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Accept header is not respected anymore in CXFRS consumer when POST
> --
>
> Key: CAMEL-12787
> URL: https://issues.apache.org/jira/browse/CAMEL-12787
> Project: Camel
>  Issue Type: Bug
>  Components: camel-cxfrs
>Affects Versions: 2.21.1, 2.21.2, 2.22.0, 2.22.1
>Reporter: Xilai Dai
>Assignee: Andrea Cosentino
>Priority: Major
> Fix For: 2.21.3, 2.22.2, 2.23.0
>
>
> Given the camel route as a cxfrs server (test case is here: 
> https://github.com/xldai/test/tree/master/cxfrs), Running the Route and send 
> POST request from curl with "Accept: application/json", but the cxfrs server 
> will always return  application/xml as Response.
> Note this issue only happening on POST method, for GET, the Accept header is 
> respected.
> No this kind of issue on Camel 2.20.x, Camel 2.21.0.



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


[jira] [Commented] (CAMEL-12787) Accept header is not respected anymore in CXFRS consumer when POST

2018-09-10 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on CAMEL-12787:


oscerd commented on issue #2513: fix CAMEL-12787 Accept header is not respected 
anymore in CXFRS consu…
URL: https://github.com/apache/camel/pull/2513#issuecomment-419803433
 
 
   Merged on master, 2.22.x and 2.21.x
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Accept header is not respected anymore in CXFRS consumer when POST
> --
>
> Key: CAMEL-12787
> URL: https://issues.apache.org/jira/browse/CAMEL-12787
> Project: Camel
>  Issue Type: Bug
>  Components: camel-cxfrs
>Affects Versions: 2.21.1, 2.21.2, 2.22.0, 2.22.1
>Reporter: Xilai Dai
>Assignee: Andrea Cosentino
>Priority: Major
> Fix For: 2.21.3, 2.22.2, 2.23.0
>
>
> Given the camel route as a cxfrs server (test case is here: 
> https://github.com/xldai/test/tree/master/cxfrs), Running the Route and send 
> POST request from curl with "Accept: application/json", but the cxfrs server 
> will always return  application/xml as Response.
> Note this issue only happening on POST method, for GET, the Accept header is 
> respected.
> No this kind of issue on Camel 2.20.x, Camel 2.21.0.



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


[jira] [Commented] (CAMEL-12787) Accept header is not respected anymore in CXFRS consumer when POST

2018-09-09 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on CAMEL-12787:


oscerd commented on issue #2513: fix CAMEL-12787 Accept header is not respected 
anymore in CXFRS consu…
URL: https://github.com/apache/camel/pull/2513#issuecomment-419794002
 
 
   I'm merging this.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Accept header is not respected anymore in CXFRS consumer when POST
> --
>
> Key: CAMEL-12787
> URL: https://issues.apache.org/jira/browse/CAMEL-12787
> Project: Camel
>  Issue Type: Bug
>  Components: camel-cxfrs
>Affects Versions: 2.21.1, 2.21.2, 2.22.0, 2.22.1
>Reporter: Xilai Dai
>Priority: Major
>
> Given the camel route as a cxfrs server (test case is here: 
> https://github.com/xldai/test/tree/master/cxfrs), Running the Route and send 
> POST request from curl with "Accept: application/json", but the cxfrs server 
> will always return  application/xml as Response.
> Note this issue only happening on POST method, for GET, the Accept header is 
> respected.
> No this kind of issue on Camel 2.20.x, Camel 2.21.0.



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


[jira] [Commented] (CAMEL-12787) Accept header is not respected anymore in CXFRS consumer when POST

2018-09-08 Thread Xilai Dai (JIRA)


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

Xilai Dai commented on CAMEL-12787:
---

As a quick fix, the PR is created https://github.com/apache/camel/pull/2513

> Accept header is not respected anymore in CXFRS consumer when POST
> --
>
> Key: CAMEL-12787
> URL: https://issues.apache.org/jira/browse/CAMEL-12787
> Project: Camel
>  Issue Type: Bug
>  Components: camel-cxfrs
>Affects Versions: 2.21.1, 2.21.2, 2.22.0, 2.22.1
>Reporter: Xilai Dai
>Priority: Major
>
> Given the camel route as a cxfrs server (test case is here: 
> https://github.com/xldai/test/tree/master/cxfrs), Running the Route and send 
> POST request from curl with "Accept: application/json", but the cxfrs server 
> will always return  application/xml as Response.
> Note this issue only happening on POST method, for GET, the Accept header is 
> respected.
> No this kind of issue on Camel 2.20.x, Camel 2.21.0.



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


[jira] [Commented] (CAMEL-12787) Accept header is not respected anymore in CXFRS consumer when POST

2018-09-08 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on CAMEL-12787:


GitHub user xldai opened a pull request:

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

fix CAMEL-12787 Accept header is not respected anymore in CXFRS consu…

…mer when POST

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

$ git pull https://github.com/xldai/camel patch-1

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

https://github.com/apache/camel/pull/2513.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 #2513


commit b3b837a697943598bdd2a9ff4488d69a36f54d72
Author: Xilai Dai 
Date:   2018-09-09T04:36:44Z

fix CAMEL-12787 Accept header is not respected anymore in CXFRS consumer 
when POST




> Accept header is not respected anymore in CXFRS consumer when POST
> --
>
> Key: CAMEL-12787
> URL: https://issues.apache.org/jira/browse/CAMEL-12787
> Project: Camel
>  Issue Type: Bug
>  Components: camel-cxfrs
>Affects Versions: 2.21.1, 2.21.2, 2.22.0, 2.22.1
>Reporter: Xilai Dai
>Priority: Major
>
> Given the camel route as a cxfrs server (test case is here: 
> https://github.com/xldai/test/tree/master/cxfrs), Running the Route and send 
> POST request from curl with "Accept: application/json", but the cxfrs server 
> will always return  application/xml as Response.
> Note this issue only happening on POST method, for GET, the Accept header is 
> respected.
> No this kind of issue on Camel 2.20.x, Camel 2.21.0.



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


[jira] [Commented] (CAMEL-12787) Accept header is not respected anymore in CXFRS consumer when POST

2018-09-08 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on CAMEL-12787:


xldai opened a new pull request #2513: fix CAMEL-12787 Accept header is not 
respected anymore in CXFRS consu…
URL: https://github.com/apache/camel/pull/2513
 
 
   …mer when POST


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Accept header is not respected anymore in CXFRS consumer when POST
> --
>
> Key: CAMEL-12787
> URL: https://issues.apache.org/jira/browse/CAMEL-12787
> Project: Camel
>  Issue Type: Bug
>  Components: camel-cxfrs
>Affects Versions: 2.21.1, 2.21.2, 2.22.0, 2.22.1
>Reporter: Xilai Dai
>Priority: Major
>
> Given the camel route as a cxfrs server (test case is here: 
> https://github.com/xldai/test/tree/master/cxfrs), Running the Route and send 
> POST request from curl with "Accept: application/json", but the cxfrs server 
> will always return  application/xml as Response.
> Note this issue only happening on POST method, for GET, the Accept header is 
> respected.
> No this kind of issue on Camel 2.20.x, Camel 2.21.0.



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


[jira] [Commented] (CAMEL-12787) Accept header is not respected anymore in CXFRS consumer when POST

2018-09-08 Thread Xilai Dai (JIRA)


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

Xilai Dai commented on CAMEL-12787:
---

Looks like we have this issue after this commit 
https://github.com/apache/camel/commit/4280d660ed7bdce2c79d7d5d3da8b63567391f5d,
 which try to fix the https://issues.apache.org/jira/browse/CAMEL-12428

> Accept header is not respected anymore in CXFRS consumer when POST
> --
>
> Key: CAMEL-12787
> URL: https://issues.apache.org/jira/browse/CAMEL-12787
> Project: Camel
>  Issue Type: Bug
>  Components: camel-cxfrs
>Affects Versions: 2.21.1, 2.21.2, 2.22.0
>Reporter: Xilai Dai
>Priority: Major
>
> Given the camel route as a cxfrs server (test case is here: 
> https://github.com/xldai/test/tree/master/cxfrs), Running the Route and send 
> POST request from curl with "Accept: application/json", but the cxfrs server 
> will always return  application/xml as Response.
> Note this issue only happening on POST method, for GET, the Accept header is 
> respected.
> No this kind of issue on Camel 2.20.x, Camel 2.21.0.



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