Details
-
Type:
Improvement
-
Status: Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Component/s: camel-netty-http, camel-netty4-http
-
Labels:None
-
Estimated Complexity:Unknown
Description
Currently it is impossible to define wildcard URI that will serve custom OPTIONS response to all the requests:
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");
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.