Configure order for routes added by platform-http consumer
- Dominant language
- Java
- Stars
- 302
- Forks
- 232
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 114
Description
This [conversation](https://camel.zulipchat.com/#narrow/stream/257302-camel-quarkus/topic/Writing.20tests) lead to an interesting discovery about how the Vert.x router route order can affect the behaviour of the platform-http consumer.
TL;DR the user set up a REST route which expected to match `method=POST` & `Content-Type=application/json`. When the correct content type was not provided by the client, a 404 response was returned instead of the expected 415.
Turns out that because `META-INF/resources` was present in the source tree, Quarkus registers Vert.x route(s) to handle the static resources. These are registered [after](https://github.com/quarkusio/quarkus/blob/4db67556839a7ef7072515539d226b872e2467c6/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/VertxHttpRecorder.java#L111) the Camel ones. Thus the 415 response is silently dropped because the static route handlers can't match anything and return a 404.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.