[jira] [Commented] (CAMEL-11951) Uri matching does not match request type

2017-10-31 Thread Robert Hillier (JIRA)

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

Robert Hillier commented on CAMEL-11951:


Will do.  Thanks once again for your help.

> Uri matching does not match request type
> 
>
> Key: CAMEL-11951
> URL: https://issues.apache.org/jira/browse/CAMEL-11951
> Project: Camel
>  Issue Type: Bug
>  Components: camel-http-common
>Affects Versions: 2.20.0
> Environment: camel-spring, camel-jetty
> OS - RHEL
>Reporter: Robert Hillier
>Assignee: Claus Ibsen
> Fix For: 2.19.4, 2.20.1, 2.21.0
>
> Attachments: camel-bug-demo.zip
>
>
> I had previously described the problem here:
> https://stackoverflow.com/questions/46936348/apache-camel-rest-dsl-405-method-not-allowed
> It appears that the problem is down to a possible bug in the way URIs are 
> matched (not to mention my rather obscure use-case)
> I have a number of REST-DSL endpoints with the same URI but different request 
> types (POST, PUT, GET, DELETE).  In my case, the URI is getting selected by
> HttpServletResolveConsumerStrategy.resolve (in addition to these, I have some 
> specific endpoints with wildcards in them)
> This method matches the URI, but not the request type.  When I send a GET 
> request, it returns the first consumer candidate it finds which, in my case, 
> always seems to be PUT.  Later, when CamelContinuationServlet.doService 
> checks that the request type and cadidate type match, they don't.  It then 
> returns 405 Method Not Allowed.
> I believe that the HttpServletResolveConsumerStrategy.resolve method IN 
> camel-hhtp-common should check the request type as well as the URI.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CAMEL-11951) Uri matching does not match request type

2017-10-31 Thread Robert Hillier (JIRA)

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

Robert Hillier commented on CAMEL-11951:


Final question is of course, when will that be?
Thanks,
Rob

> Uri matching does not match request type
> 
>
> Key: CAMEL-11951
> URL: https://issues.apache.org/jira/browse/CAMEL-11951
> Project: Camel
>  Issue Type: Bug
>  Components: camel-http-common
>Affects Versions: 2.20.0
> Environment: camel-spring, camel-jetty
> OS - RHEL
>Reporter: Robert Hillier
>Assignee: Claus Ibsen
> Fix For: 2.19.4, 2.20.1, 2.21.0
>
> Attachments: camel-bug-demo.zip
>
>
> I had previously described the problem here:
> https://stackoverflow.com/questions/46936348/apache-camel-rest-dsl-405-method-not-allowed
> It appears that the problem is down to a possible bug in the way URIs are 
> matched (not to mention my rather obscure use-case)
> I have a number of REST-DSL endpoints with the same URI but different request 
> types (POST, PUT, GET, DELETE).  In my case, the URI is getting selected by
> HttpServletResolveConsumerStrategy.resolve (in addition to these, I have some 
> specific endpoints with wildcards in them)
> This method matches the URI, but not the request type.  When I send a GET 
> request, it returns the first consumer candidate it finds which, in my case, 
> always seems to be PUT.  Later, when CamelContinuationServlet.doService 
> checks that the request type and cadidate type match, they don't.  It then 
> returns 405 Method Not Allowed.
> I believe that the HttpServletResolveConsumerStrategy.resolve method IN 
> camel-hhtp-common should check the request type as well as the URI.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Comment Edited] (CAMEL-11951) Uri matching does not match request type

2017-10-31 Thread Robert Hillier (JIRA)

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

Robert Hillier edited comment on CAMEL-11951 at 10/31/17 10:38 AM:
---

Claus,

Many thanks for this, and very nicely done too.

What's the process for getting a fixed version?  Will I need to wait for 
2.20.1?  Also, should I close the issue?

Regards,

Rob


was (Author: robert.hillier):
Claus,

Many thanks for this, and very nicely done too.

What's the process for getting a fixed version?  Will I need to wait for 2.20.1?

Regards,

Rob

> Uri matching does not match request type
> 
>
> Key: CAMEL-11951
> URL: https://issues.apache.org/jira/browse/CAMEL-11951
> Project: Camel
>  Issue Type: Bug
>  Components: camel-http-common
>Affects Versions: 2.20.0
> Environment: camel-spring, camel-jetty
> OS - RHEL
>Reporter: Robert Hillier
>Assignee: Claus Ibsen
> Fix For: 2.19.4, 2.20.1, 2.21.0
>
> Attachments: camel-bug-demo.zip
>
>
> I had previously described the problem here:
> https://stackoverflow.com/questions/46936348/apache-camel-rest-dsl-405-method-not-allowed
> It appears that the problem is down to a possible bug in the way URIs are 
> matched (not to mention my rather obscure use-case)
> I have a number of REST-DSL endpoints with the same URI but different request 
> types (POST, PUT, GET, DELETE).  In my case, the URI is getting selected by
> HttpServletResolveConsumerStrategy.resolve (in addition to these, I have some 
> specific endpoints with wildcards in them)
> This method matches the URI, but not the request type.  When I send a GET 
> request, it returns the first consumer candidate it finds which, in my case, 
> always seems to be PUT.  Later, when CamelContinuationServlet.doService 
> checks that the request type and cadidate type match, they don't.  It then 
> returns 405 Method Not Allowed.
> I believe that the HttpServletResolveConsumerStrategy.resolve method IN 
> camel-hhtp-common should check the request type as well as the URI.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CAMEL-11951) Uri matching does not match request type

2017-10-31 Thread Robert Hillier (JIRA)

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

Robert Hillier commented on CAMEL-11951:


Claus,

Many thanks for this, and very nicely done too.

What's the process for getting a fixed version?  Will I need to wait for 2.20.1?

Regards,

Rob

> Uri matching does not match request type
> 
>
> Key: CAMEL-11951
> URL: https://issues.apache.org/jira/browse/CAMEL-11951
> Project: Camel
>  Issue Type: Bug
>  Components: camel-http-common
>Affects Versions: 2.20.0
> Environment: camel-spring, camel-jetty
> OS - RHEL
>Reporter: Robert Hillier
>Assignee: Claus Ibsen
> Fix For: 2.19.4, 2.20.1, 2.21.0
>
> Attachments: camel-bug-demo.zip
>
>
> I had previously described the problem here:
> https://stackoverflow.com/questions/46936348/apache-camel-rest-dsl-405-method-not-allowed
> It appears that the problem is down to a possible bug in the way URIs are 
> matched (not to mention my rather obscure use-case)
> I have a number of REST-DSL endpoints with the same URI but different request 
> types (POST, PUT, GET, DELETE).  In my case, the URI is getting selected by
> HttpServletResolveConsumerStrategy.resolve (in addition to these, I have some 
> specific endpoints with wildcards in them)
> This method matches the URI, but not the request type.  When I send a GET 
> request, it returns the first consumer candidate it finds which, in my case, 
> always seems to be PUT.  Later, when CamelContinuationServlet.doService 
> checks that the request type and cadidate type match, they don't.  It then 
> returns 405 Method Not Allowed.
> I believe that the HttpServletResolveConsumerStrategy.resolve method IN 
> camel-hhtp-common should check the request type as well as the URI.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Comment Edited] (CAMEL-11951) Uri matching does not match request type

2017-10-31 Thread Robert Hillier (JIRA)

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

Robert Hillier edited comment on CAMEL-11951 at 10/31/17 10:04 AM:
---

Claus,

As described, the "detail" request needs to be handled by one of the proxy 
requests, and not a specific request.  The proxy works fine, until I add REST 
services that contain variable parameters.  If you comment out the "detail" 
request, you'll find that the requests are proxied successfully.  When they are 
enabled, proxied requests return 405.

Thanks,

Rob


was (Author: robert.hillier):
Clause,

As described, the "detail" request needs to be handled by one of the proxy 
requests, and not a specific request.  The proxy works fine, until I add REST 
services that contain variable parameters.  If you comment out the "detail" 
request, you'll find that the requests are proxied successfully.  When they are 
enabled, proxied requests return 405.

Thanks,

Rob

> Uri matching does not match request type
> 
>
> Key: CAMEL-11951
> URL: https://issues.apache.org/jira/browse/CAMEL-11951
> Project: Camel
>  Issue Type: Bug
>  Components: camel-http-common
>Affects Versions: 2.20.0
> Environment: camel-spring, camel-jetty
> OS - RHEL
>Reporter: Robert Hillier
> Attachments: camel-bug-demo.zip
>
>
> I had previously described the problem here:
> https://stackoverflow.com/questions/46936348/apache-camel-rest-dsl-405-method-not-allowed
> It appears that the problem is down to a possible bug in the way URIs are 
> matched (not to mention my rather obscure use-case)
> I have a number of REST-DSL endpoints with the same URI but different request 
> types (POST, PUT, GET, DELETE).  In my case, the URI is getting selected by
> HttpServletResolveConsumerStrategy.resolve (in addition to these, I have some 
> specific endpoints with wildcards in them)
> This method matches the URI, but not the request type.  When I send a GET 
> request, it returns the first consumer candidate it finds which, in my case, 
> always seems to be PUT.  Later, when CamelContinuationServlet.doService 
> checks that the request type and cadidate type match, they don't.  It then 
> returns 405 Method Not Allowed.
> I believe that the HttpServletResolveConsumerStrategy.resolve method IN 
> camel-hhtp-common should check the request type as well as the URI.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CAMEL-11951) Uri matching does not match request type

2017-10-31 Thread Robert Hillier (JIRA)

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

Robert Hillier commented on CAMEL-11951:


Clause,

As described, the "detail" request needs to be handled by one of the proxy 
requests, and not a specific request.  The proxy works fine, until I add REST 
services that contain variable parameters.  If you comment out the "detail" 
request, you'll find that the requests are proxied successfully.  When they are 
enabled, proxied requests return 405.

Thanks,

Rob

> Uri matching does not match request type
> 
>
> Key: CAMEL-11951
> URL: https://issues.apache.org/jira/browse/CAMEL-11951
> Project: Camel
>  Issue Type: Bug
>  Components: camel-http-common
>Affects Versions: 2.20.0
> Environment: camel-spring, camel-jetty
> OS - RHEL
>Reporter: Robert Hillier
> Attachments: camel-bug-demo.zip
>
>
> I had previously described the problem here:
> https://stackoverflow.com/questions/46936348/apache-camel-rest-dsl-405-method-not-allowed
> It appears that the problem is down to a possible bug in the way URIs are 
> matched (not to mention my rather obscure use-case)
> I have a number of REST-DSL endpoints with the same URI but different request 
> types (POST, PUT, GET, DELETE).  In my case, the URI is getting selected by
> HttpServletResolveConsumerStrategy.resolve (in addition to these, I have some 
> specific endpoints with wildcards in them)
> This method matches the URI, but not the request type.  When I send a GET 
> request, it returns the first consumer candidate it finds which, in my case, 
> always seems to be PUT.  Later, when CamelContinuationServlet.doService 
> checks that the request type and cadidate type match, they don't.  It then 
> returns 405 Method Not Allowed.
> I believe that the HttpServletResolveConsumerStrategy.resolve method IN 
> camel-hhtp-common should check the request type as well as the URI.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CAMEL-11951) Uri matching does not match request type

2017-10-31 Thread Robert Hillier (JIRA)

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

Robert Hillier commented on CAMEL-11951:


Claus,

That's correct.  The "detail" request gets proxied through to the backend 
service by one of the four proxy REST services.  These are the ones with the 
"/v1?matchOnUriPrefix=truechunked=false" uri.  But it is not selecting the 
correct service, as described above.

When I stepped through the code, I noticed that it is selecting the best 
matching URI, but it selects the first one it finds (which always seems to be 
"put").  When it later checks the restriction against the incoming request 
type, it rejects with 405.

Thanks,

Rob

> Uri matching does not match request type
> 
>
> Key: CAMEL-11951
> URL: https://issues.apache.org/jira/browse/CAMEL-11951
> Project: Camel
>  Issue Type: Bug
>  Components: camel-http-common
>Affects Versions: 2.20.0
> Environment: camel-spring, camel-jetty
> OS - RHEL
>Reporter: Robert Hillier
> Attachments: camel-bug-demo.zip
>
>
> I had previously described the problem here:
> https://stackoverflow.com/questions/46936348/apache-camel-rest-dsl-405-method-not-allowed
> It appears that the problem is down to a possible bug in the way URIs are 
> matched (not to mention my rather obscure use-case)
> I have a number of REST-DSL endpoints with the same URI but different request 
> types (POST, PUT, GET, DELETE).  In my case, the URI is getting selected by
> HttpServletResolveConsumerStrategy.resolve (in addition to these, I have some 
> specific endpoints with wildcards in them)
> This method matches the URI, but not the request type.  When I send a GET 
> request, it returns the first consumer candidate it finds which, in my case, 
> always seems to be PUT.  Later, when CamelContinuationServlet.doService 
> checks that the request type and cadidate type match, they don't.  It then 
> returns 405 Method Not Allowed.
> I believe that the HttpServletResolveConsumerStrategy.resolve method IN 
> camel-hhtp-common should check the request type as well as the URI.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (CAMEL-11951) Uri matching does not match request type

2017-10-30 Thread Robert Hillier (JIRA)

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

Robert Hillier updated CAMEL-11951:
---
Attachment: camel-bug-demo.zip

Apologies, the properties aren't used in this demo, and can be removed.  I have 
updated the source and attached a zip file.

Many thanks,

Rob

> Uri matching does not match request type
> 
>
> Key: CAMEL-11951
> URL: https://issues.apache.org/jira/browse/CAMEL-11951
> Project: Camel
>  Issue Type: Bug
>  Components: camel-http-common
>Affects Versions: 2.20.0
> Environment: camel-spring, camel-jetty
> OS - RHEL
>Reporter: Robert Hillier
> Attachments: camel-bug-demo.zip
>
>
> I had previously described the problem here:
> https://stackoverflow.com/questions/46936348/apache-camel-rest-dsl-405-method-not-allowed
> It appears that the problem is down to a possible bug in the way URIs are 
> matched (not to mention my rather obscure use-case)
> I have a number of REST-DSL endpoints with the same URI but different request 
> types (POST, PUT, GET, DELETE).  In my case, the URI is getting selected by
> HttpServletResolveConsumerStrategy.resolve (in addition to these, I have some 
> specific endpoints with wildcards in them)
> This method matches the URI, but not the request type.  When I send a GET 
> request, it returns the first consumer candidate it finds which, in my case, 
> always seems to be PUT.  Later, when CamelContinuationServlet.doService 
> checks that the request type and cadidate type match, they don't.  It then 
> returns 405 Method Not Allowed.
> I believe that the HttpServletResolveConsumerStrategy.resolve method IN 
> camel-hhtp-common should check the request type as well as the URI.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (CAMEL-11951) Uri matching does not match request type

2017-10-30 Thread Robert Hillier (JIRA)

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

Robert Hillier updated CAMEL-11951:
---
Attachment: (was: camel-bug-demo.zip)

> Uri matching does not match request type
> 
>
> Key: CAMEL-11951
> URL: https://issues.apache.org/jira/browse/CAMEL-11951
> Project: Camel
>  Issue Type: Bug
>  Components: camel-http-common
>Affects Versions: 2.20.0
> Environment: camel-spring, camel-jetty
> OS - RHEL
>Reporter: Robert Hillier
>
> I had previously described the problem here:
> https://stackoverflow.com/questions/46936348/apache-camel-rest-dsl-405-method-not-allowed
> It appears that the problem is down to a possible bug in the way URIs are 
> matched (not to mention my rather obscure use-case)
> I have a number of REST-DSL endpoints with the same URI but different request 
> types (POST, PUT, GET, DELETE).  In my case, the URI is getting selected by
> HttpServletResolveConsumerStrategy.resolve (in addition to these, I have some 
> specific endpoints with wildcards in them)
> This method matches the URI, but not the request type.  When I send a GET 
> request, it returns the first consumer candidate it finds which, in my case, 
> always seems to be PUT.  Later, when CamelContinuationServlet.doService 
> checks that the request type and cadidate type match, they don't.  It then 
> returns 405 Method Not Allowed.
> I believe that the HttpServletResolveConsumerStrategy.resolve method IN 
> camel-hhtp-common should check the request type as well as the URI.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (CAMEL-11951) Uri matching does not match request type

2017-10-30 Thread Robert Hillier (JIRA)

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

Robert Hillier updated CAMEL-11951:
---
Attachment: camel-bug-demo.zip

As requested, Camel Bug Demo project attached.

To start the project, run:
mvn clean install camel:run

The project contains a number of routes which make http calls to a dummy server 
running on a Heroku instance.  There are two REST calls which demonstrate the 
problem:

http://{{serverAddr}}/integration/api/v1/customer/123456/devices

http://{{serverAddr}}/integration/api/v1/customer/123456/detail

The "devices" request is a specific uri, which performs some simple 
aggregation.  It contains a variable part in it's URI, used in subsequent 
calls.  This one is working fine

The "detail" request should be simply proxied through to the other server.  
However, this call returns a 405 Method Not Allowed.

Furthermore, if you comment out the "devices" request and restart, the proxied 
"detail" call then works fine.

> Uri matching does not match request type
> 
>
> Key: CAMEL-11951
> URL: https://issues.apache.org/jira/browse/CAMEL-11951
> Project: Camel
>  Issue Type: Bug
>  Components: camel-http-common
>Affects Versions: 2.20.0
> Environment: camel-spring, camel-jetty
> OS - RHEL
>Reporter: Robert Hillier
> Attachments: camel-bug-demo.zip
>
>
> I had previously described the problem here:
> https://stackoverflow.com/questions/46936348/apache-camel-rest-dsl-405-method-not-allowed
> It appears that the problem is down to a possible bug in the way URIs are 
> matched (not to mention my rather obscure use-case)
> I have a number of REST-DSL endpoints with the same URI but different request 
> types (POST, PUT, GET, DELETE).  In my case, the URI is getting selected by
> HttpServletResolveConsumerStrategy.resolve (in addition to these, I have some 
> specific endpoints with wildcards in them)
> This method matches the URI, but not the request type.  When I send a GET 
> request, it returns the first consumer candidate it finds which, in my case, 
> always seems to be PUT.  Later, when CamelContinuationServlet.doService 
> checks that the request type and cadidate type match, they don't.  It then 
> returns 405 Method Not Allowed.
> I believe that the HttpServletResolveConsumerStrategy.resolve method IN 
> camel-hhtp-common should check the request type as well as the URI.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (CAMEL-11951) Uri matching does not match request type

2017-10-26 Thread Robert Hillier (JIRA)
Robert Hillier created CAMEL-11951:
--

 Summary: Uri matching does not match request type
 Key: CAMEL-11951
 URL: https://issues.apache.org/jira/browse/CAMEL-11951
 Project: Camel
  Issue Type: Bug
  Components: camel-http-common
Affects Versions: 2.20.0
 Environment: camel-spring, camel-jetty
OS - RHEL
Reporter: Robert Hillier


I had previously described the problem here:
https://stackoverflow.com/questions/46936348/apache-camel-rest-dsl-405-method-not-allowed

It appears that the problem is down to a possible bug in the way URIs are 
matched (not to mention my rather obscure use-case)

I have a number of REST-DSL endpoints with the same URI but different request 
types (POST, PUT, GET, DELETE).  In my case, the URI is getting selected by
HttpServletResolveConsumerStrategy.resolve (in addition to these, I have some 
specific endpoints with wildcards in them)

This method matches the URI, but not the request type.  When I send a GET 
request, it returns the first consumer candidate it finds which, in my case, 
always seems to be PUT.  Later, when CamelContinuationServlet.doService checks 
that the request type and cadidate type match, they don't.  It then returns 405 
Method Not Allowed.

I believe that the HttpServletResolveConsumerStrategy.resolve method IN 
camel-hhtp-common should check the request type as well as the URI.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)