You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2014/11/02 13:42:33 UTC

[jira] [Commented] (CAMEL-7906) camel-restlet component receive error: "405 Method Not Allowed" from other restlet for one level URL with template in the end

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

Claus Ibsen commented on CAMEL-7906:
------------------------------------

Its a bug in restlet that in {{org.restlet.util.RouteList#getBest}} that doesnt find the best. There uri that has 100% match isn't picked over the uri that is 99% matched. They both get a score of 1.0, and restlet picks the 1st one.

> camel-restlet component receive error: "405 Method Not Allowed" from other restlet for one level URL with template in the end
> -----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-7906
>                 URL: https://issues.apache.org/jira/browse/CAMEL-7906
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-restlet
>            Reporter: Sergey Semka
>         Attachments: BugInRestletMultiRoutesEndpointTest.java
>
>
> Description of bug #1:
> We had to receive error: "405 Method Not Allowed"
> because the invoked restlet (route) does not have the requested POST method.
> (it has restletMethods=GET).
> But we do not get such an error. We get response status = 200.
> Because we get into the rout of another restlet (which ends in a template).
> We request the following URL:
>    http://localhost:1101/users/{id}/test/search       ,restletMethods=GET
> But we get to URL:
>    http://localhost:1101/users/{id}/test/{username}    ,restletMethods=PUT,POST
> Description of bug #2:
> There is restlet (route): http://localhost:1101/users/{id}/test/search, which supports restletMethods GET but when we request it, we get the following error: "405 Method Not Allowed"
> tests for confirmation of existence of two bugs in camel-restlet:
> Link for file in Google Drive:
> https://drive.google.com/file/d/0B0DfsrbRTR2tamJXNTEyVXJPVHc/view?usp=sharing



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)