Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
Unknown
Description
The order in which routes are declared changes the behavior of the integration.
E.g.
rest() .get("/{pippo}") .route() .setBody().simple("Route with name: ${header.pippo}") .setHeader("Content-Type", constant("text/plain")); rest() .get("/") .route() .setBody().constant("Route without name") .setHeader("Content-Type", constant("text/plain"));
When calling it with:
curl http://service:8080/
The first route replies ("Route with name: ..."), but the second was supposed to.
This same example works with jetty and netty-http.
As workaround for undertow, if the order of the two routes is reversed, it works correctly.
But when you create a route from a given openapi.json file, the order is given and you're not supposed to change it.