camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Hillier (JIRA)" <>
Subject [jira] [Updated] (CAMEL-11951) Uri matching does not match request type
Date Mon, 30 Oct 2017 12:38:00 GMT


Robert Hillier updated CAMEL-11951:

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:



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:
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-http-common
>    Affects Versions: 2.20.0
>         Environment: camel-spring, camel-jetty
>            Reporter: Robert Hillier
>         Attachments:
> I had previously described the problem here:
> 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

View raw message