[
https://issues.apache.org/jira/browse/CAMEL-8685?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Henryk Konsek resolved CAMEL-8685.
----------------------------------
Resolution: Fixed
Resolved in 5b27ecc8aae83f6a4a8b1cd14133387f01d77151.
> Netty should resolve OPTIONS prefix matches earlier
> ---------------------------------------------------
>
> Key: CAMEL-8685
> URL: https://issues.apache.org/jira/browse/CAMEL-8685
> Project: Camel
> Issue Type: Improvement
> Components: camel-netty-http, camel-netty4-http
> Reporter: Henryk Konsek
> Assignee: Henryk Konsek
> Fix For: 2.15.2, 2.16.0
>
>
> Currently it is impossible to define wildcard URI that will serve custom
> OPTIONS response to all the requests:
> {code}
>
> from("netty4-http:http://0.0.0.0:{{port}}/path1?httpMethodRestrict=POST").setBody().constant("somePostResponse");
>
> from("netty4-http:http://0.0.0.0:{{port}}?matchOnUriPrefix=true&httpMethodRestrict=OPTIONS").setBody().constant("expectedOptionsResponse");
> {code}
> POST route is detected as match for OPTION method too early and the second
> route is never called.
> Netty HTTP should be smart enough to find out that there is the wildcard
> route serving OPTION requests and prefer that route over the default OPTION
> response generated by the POST routes.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)