[jira] [Commented] (CAMEL-10985) camel-coap fails to return results when enableCORS(true) is set

2017-04-27 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-10985:


Github user jamesnetherton closed the pull request at:

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


> camel-coap fails to return results when enableCORS(true) is set
> ---
>
> Key: CAMEL-10985
> URL: https://issues.apache.org/jira/browse/CAMEL-10985
> Project: Camel
>  Issue Type: Bug
>  Components: camel-coap
>Affects Versions: 2.19.0
>Reporter: Scott Cranton
>Priority: Minor
> Fix For: 2.19.0
>
>
> In the CoAPRestVerbTest, if you add to the restConfiguration() 
> .enableCORS(true), then all of the unit tests that return a result fail as no 
> response is returned
> https://github.com/apache/camel/blob/master/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPRestVerbTest.java#L106



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CAMEL-10985) camel-coap fails to return results when enableCORS(true) is set

2017-04-27 Thread Zoran Regvart (JIRA)

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

Zoran Regvart commented on CAMEL-10985:
---

I concur with [~jamesnetherton] the [RFC7252 section 
5.8|https://tools.ietf.org/html/rfc7252#section-5.8] does not mention 
{{OPTIONS}} method, this can safely be removed from CoAP.

> camel-coap fails to return results when enableCORS(true) is set
> ---
>
> Key: CAMEL-10985
> URL: https://issues.apache.org/jira/browse/CAMEL-10985
> Project: Camel
>  Issue Type: Bug
>  Components: camel-coap
>Affects Versions: 2.19.0
>Reporter: Scott Cranton
>Priority: Minor
> Fix For: 2.20.0
>
>
> In the CoAPRestVerbTest, if you add to the restConfiguration() 
> .enableCORS(true), then all of the unit tests that return a result fail as no 
> response is returned
> https://github.com/apache/camel/blob/master/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPRestVerbTest.java#L106



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CAMEL-10985) camel-coap fails to return results when enableCORS(true) is set

2017-04-27 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-10985:


GitHub user jamesnetherton opened a pull request:

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

CAMEL-10985: Ignore CORS configuraion in CoAP component

https://issues.apache.org/jira/browse/CAMEL-10985

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

$ git pull https://github.com/jamesnetherton/camel CAMEL-10985

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

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


commit ff417180291e2ece3e9d3dc4c918498805b6278c
Author: James Netherton 
Date:   2017-04-27T09:48:33Z

CAMEL-10985: Ignore CORS configuraion in CoAP component




> camel-coap fails to return results when enableCORS(true) is set
> ---
>
> Key: CAMEL-10985
> URL: https://issues.apache.org/jira/browse/CAMEL-10985
> Project: Camel
>  Issue Type: Bug
>  Components: camel-coap
>Affects Versions: 2.19.0
>Reporter: Scott Cranton
>Priority: Minor
> Fix For: 2.20.0
>
>
> In the CoAPRestVerbTest, if you add to the restConfiguration() 
> .enableCORS(true), then all of the unit tests that return a result fail as no 
> response is returned
> https://github.com/apache/camel/blob/master/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPRestVerbTest.java#L106



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CAMEL-10985) camel-coap fails to return results when enableCORS(true) is set

2017-04-25 Thread Claus Ibsen (JIRA)

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

Claus Ibsen commented on CAMEL-10985:
-

[~jamesnetherton] ah yeah CORS does not make sense for coap. I guess we would 
need to change some logic in camel-coap to avoid CORS.

Contributions is welcome

> camel-coap fails to return results when enableCORS(true) is set
> ---
>
> Key: CAMEL-10985
> URL: https://issues.apache.org/jira/browse/CAMEL-10985
> Project: Camel
>  Issue Type: Bug
>  Components: camel-coap
>Affects Versions: 2.19.0
>Reporter: Scott Cranton
>Priority: Minor
> Fix For: 2.20.0
>
>
> In the CoAPRestVerbTest, if you add to the restConfiguration() 
> .enableCORS(true), then all of the unit tests that return a result fail as no 
> response is returned
> https://github.com/apache/camel/blob/master/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPRestVerbTest.java#L106



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CAMEL-10985) camel-coap fails to return results when enableCORS(true) is set

2017-04-24 Thread James Netherton (JIRA)

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

James Netherton commented on CAMEL-10985:
-

I'm no expert on CoAP, but, does CORS even make sense in this context? See 
method codes listed in this document (OPTIONS is not mentioned):

https://github.com/markushx/coap-cheatsheet/blob/master/coap-cheatsheet.pdf

The reason things are not working, is because when CORS is enabled, camel is 
[automatically 
adding|https://github.com/apache/camel/blob/master/components/camel-coap/src/main/java/org/apache/camel/coap/CoAPComponent.java#L119-L121]
 {{OPTIONS}} to the list of allowed method verbs configured on the endpoint. 
This screws up the logic to retrieve the correct consumer to handle the 
request, since it's expecting to match against individual verb names like 
{{GET}} or {{POST}} etc. Not {{GET,OPTIONS}} or {{POST,OPTIONS}} etc.



> camel-coap fails to return results when enableCORS(true) is set
> ---
>
> Key: CAMEL-10985
> URL: https://issues.apache.org/jira/browse/CAMEL-10985
> Project: Camel
>  Issue Type: Bug
>  Components: camel-coap
>Affects Versions: 2.19.0
>Reporter: Scott Cranton
>Priority: Minor
>
> In the CoAPRestVerbTest, if you add to the restConfiguration() 
> .enableCORS(true), then all of the unit tests that return a result fail as no 
> response is returned
> https://github.com/apache/camel/blob/master/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPRestVerbTest.java#L106



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CAMEL-10985) camel-coap fails to return results when enableCORS(true) is set

2017-04-21 Thread James Netherton (JIRA)

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

James Netherton commented on CAMEL-10985:
-

Ok, I'll take a peek at it early next week.

> camel-coap fails to return results when enableCORS(true) is set
> ---
>
> Key: CAMEL-10985
> URL: https://issues.apache.org/jira/browse/CAMEL-10985
> Project: Camel
>  Issue Type: Bug
>  Components: camel-coap
>Affects Versions: 2.19.0
>Reporter: Scott Cranton
>Priority: Minor
>
> In the CoAPRestVerbTest, if you add to the restConfiguration() 
> .enableCORS(true), then all of the unit tests that return a result fail as no 
> response is returned
> https://github.com/apache/camel/blob/master/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPRestVerbTest.java#L106



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CAMEL-10985) camel-coap fails to return results when enableCORS(true) is set

2017-04-21 Thread Claus Ibsen (JIRA)

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

Claus Ibsen commented on CAMEL-10985:
-

[~jamesnetherton] in case you want to have more fun with camel-coap then we 
have this ticket

> camel-coap fails to return results when enableCORS(true) is set
> ---
>
> Key: CAMEL-10985
> URL: https://issues.apache.org/jira/browse/CAMEL-10985
> Project: Camel
>  Issue Type: Bug
>  Components: camel-coap
>Affects Versions: 2.19.0
>Reporter: Scott Cranton
>Priority: Minor
>
> In the CoAPRestVerbTest, if you add to the restConfiguration() 
> .enableCORS(true), then all of the unit tests that return a result fail as no 
> response is returned
> https://github.com/apache/camel/blob/master/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPRestVerbTest.java#L106



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CAMEL-10985) camel-coap fails to return results when enableCORS(true) is set

2017-04-21 Thread Claus Ibsen (JIRA)

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

Claus Ibsen commented on CAMEL-10985:
-

Wonder if the recent fix in camel-coap may have improved this? We can test on 
master.

> camel-coap fails to return results when enableCORS(true) is set
> ---
>
> Key: CAMEL-10985
> URL: https://issues.apache.org/jira/browse/CAMEL-10985
> Project: Camel
>  Issue Type: Bug
>  Components: camel-coap
>Affects Versions: 2.19.0
>Reporter: Scott Cranton
>Priority: Minor
>
> In the CoAPRestVerbTest, if you add to the restConfiguration() 
> .enableCORS(true), then all of the unit tests that return a result fail as no 
> response is returned
> https://github.com/apache/camel/blob/master/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPRestVerbTest.java#L106



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)