jamesnetherton opened a new issue #2042:
URL: https://github.com/apache/camel-quarkus/issues/2042


   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.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to