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 2012/08/13 16:42:38 UTC

[jira] [Comment Edited] (CAMEL-5458) Jetty/HTTP Pathless Consumer matchOnUriPrefix=true Breaks Producer bridgeEndpoint=true

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

Claus Ibsen edited comment on CAMEL-5458 at 8/14/12 1:41 AM:
-------------------------------------------------------------

It will always bridge to the path you requested, so if you request /ping, then the path /ping is appended to the "to" endpoint uri.
So if you call /pong, then it becomes /proxy/ping/pong. 

If you *always* want to call the same uri, then you should maybe not bridge the endpoints, but a plain to instead. And then you should remove the CamelHttp headers beforehand (or possible there is some option you can configure to suppress the uri header in the from).
                
      was (Author: davsclaus):
    It will always bridge to the path you requested, so if you request /ping, then the path /path is appended to the "to" endpoint uri.
So if you call /pong, then it becomes /proxy/ping/pong. 

If you *always* want to call the same uri, then you should maybe not bridge the endpoints, but a plain to instead. And then you should remove the CamelHttp headers beforehand (or possible there is some option you can configure to suppress the uri header in the from).
                  
> Jetty/HTTP Pathless Consumer matchOnUriPrefix=true Breaks Producer bridgeEndpoint=true
> --------------------------------------------------------------------------------------
>
>                 Key: CAMEL-5458
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5458
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-http, camel-jetty
>    Affects Versions: 2.10.0
>            Reporter: Scott England-Sullivan
>            Assignee: Willem Jiang
>         Attachments: CAMEL-5458.patch, CAMEL-5458-v2.patch, CAMEL-5458-willem.patch
>
>
> When a Jetty/HTTP endpoint that has the matchOnUriPrefix=true option set and is configured to match any URI (no path is specified) the HttpHelper concatenates the consumer path to the producer endpoint creating an HttpOperationUnsupportedException.
> For example the following will process as expected and the HttpHelper class will create the http://localhost:10021/proxy/ping consumer URI:
> {code}
> from("jetty:http://localhost:10020/ping?matchOnUriPrefix=true")
>     .to("jetty:http://localhost:10021/proxy/ping?bridgeEndpoint=true");
> {code}
> While this code will create http://localhost:10021/proxy/ping/ping and create the exception (the only difference is there isn't a path on the consumer):
> {code}
> from("jetty:http://localhost:10020?matchOnUriPrefix=true")
>     .to("jetty:http://localhost:10021/proxy/ping?bridgeEndpoint=true");
> {code}
> Test case and patch will be uploaded shortly.
> Thanks,
> Scott ES
> http://fusesource.com

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira