-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle static resources in vertx-http #10912
Handle static resources in vertx-http #10912
Conversation
mkouba
commented
Jul 22, 2020
- the logic was moved from RESTEasy standalone
- thanks to that static resources are served even for vertx-web
- the logic was moved from RESTEasy standalone - thanks to that static resources are served even for vertx-web
.../vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/StaticResourcesRecorder.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I did one suggestion (just a typo).
...nsions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/VertxHttpRecorder.java
Outdated
Show resolved
Hide resolved
I would be curious to see the CI Build... |
The CI build or a CI failure? ;-) |
- used to workaround vert-x3/vertx-web#1429
The CI is green. I think that we're ready to go... |
executorBuildItem.getExecutorProxy(), httpConfiguration); | ||
// Exact match for resources matched to the root path | ||
routes.produce(new RouteBuildItem( | ||
new BasicRoute(standalone.deploymentRootPath, VertxHttpRecorder.DEFAULT_ROUTE_ORDER + 1), handler)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The order value of VertxHttpRecorder.DEFAULT_ROUTE_ORDER + 1
means that resteasy route (resource methods) are called after the default route. Unlike custom routes and @Route
methods which are called before the default route. The problem with resteasy route is that it returns 404 for unknown resource and does not call RoutingContext.next()
. And since we handle the static resources in the default route it would always return 404 for a request to a static route. @cescoffier @stuartwdouglas Do you think this approach is OK? If yes, I'm going to merge this PR...