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 2020/01/09 10:28:00 UTC

[jira] [Resolved] (CAMEL-14303) Setting matchOnUriPrefix on netty-http Rest Component causes api route to fail

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

Claus Ibsen resolved CAMEL-14303.
---------------------------------
    Resolution: Fixed

> Setting matchOnUriPrefix on netty-http Rest Component causes api route to fail
> ------------------------------------------------------------------------------
>
>                 Key: CAMEL-14303
>                 URL: https://issues.apache.org/jira/browse/CAMEL-14303
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-netty-http
>    Affects Versions: 3.0.0
>            Reporter: Bob Paulin
>            Priority: Trivial
>             Fix For: 3.0.1, 3.1.0
>
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> When using the rest dsl with the following configuration:
> {code:java}
>  restConfiguration().component("netty-http").port(8080)
>             .endpointProperty("matchOnUriPrefix", "true")
>             .apiContextPath("/api-doc").apiProperty("api.title", "Camel Examples Karaf Rest API")
>             .apiProperty("api.version", "1.0.0");{code}
> Starting the /api-doc route throws the following error:
> {code:java}
>  org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: netty-http://http://localhost:8080/api-doc?httpMethodRestrict=GET&matchOnUriPrefix=true&matchOnUriPrefix=true due to: Error binding property (matchOnUriPrefix=[true, true]) with name: matchOnUriPrefix on bean: org.apache.camel.component.netty.http.NettyHttpConfiguration@2918e3d7 with value: [true, true] {code}
> This is because the NettyHttpComponent class hard codes matchOnUriPrefix  on this route so it is added twice.  This configuration should only be added if it does not already exists.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)