Skip to content
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

Merged

Conversation

mkouba
Copy link
Contributor

@mkouba 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
Copy link
Member

@cescoffier cescoffier left a 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).

@cescoffier
Copy link
Member

I would be curious to see the CI Build...

@mkouba
Copy link
Contributor Author

mkouba commented Jul 23, 2020

I would be curious to see the CI Build...

The CI build or a CI failure? ;-)

@mkouba mkouba marked this pull request as ready for review July 23, 2020 14:00
@mkouba
Copy link
Contributor Author

mkouba commented Jul 24, 2020

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));
Copy link
Contributor Author

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants