Closed zenonwch closed 1 year ago
Which extensions are you using?
@geoand, I don't clearly understand what you mean by extensions. But we use the following Quarkus dependencies: io.quarkus:quarkus-core:2.16.5.Final io.quarkus:quarkus-resteasy:2.16.5.Final io.quarkus:quarkus-resteasy-jackson:2.16.5.Final io.quarkus:quarkus-jackson:2.16.5.Final io.quarkus:quarkus-smallrye-openapi:2.16.5.Final io.quarkus:quarkus-smallrye-opentracing:2.16.5.Final io.quarkus:quarkus-smallrye-metrics:2.16.5.Final io.quarkus:quarkus-config-yaml:2.16.5.Final io.quarkus:quarkus-kotlin:2.16.5.Final io.quarkus:quarkus-rest-client:2.16.5.Final io.quarkus:quarkus-oidc:2.16.5.Final io.quarkus:quarkus-reactive-routes:2.16.5.Final io.quarkus:quarkus-logging-gelf:2.16.5.Final io.quarkus:quarkus-hibernate-validator:2.16.5.Final io.quarkus:quarkus-narayana-jta:2.16.5.Final io.quarkus:quarkus-smallrye-jwt:2.16.5.Final io.quarkus:quarkus-smallrye-health:2.16.5.Final io.quarkiverse.logging.logback:quarkus-logging-logback:0.13.0
and for tests io.quarkus:quarkus-junit5-mockito:2.16.5.Final io.quarkus:quarkus-test-security-jwt:2.16.5.Final io.quarkus:quarkus-jdbc-h2:2.16.5.Final
Close enough :)
Could you attach the sample application you are using please? It will make things a lot easier for us.
Thanks
@geoand, I created as simple as possible project - https://github.com/zenonwch/test-static-resource-options
Thanks.
I am getting a 404 with that link however
I think I recall we enabled GET
and HEAD
for static resources. We might have to also enable OPTIONS
.
(but that's a very vague recollection so I might be mistaken)
Very likely, however I don't remember at all. I'll have a look later on.
Look like it!
Do you want a send a PR adding OPTIONS
?
Yeah, I'll have a look later today.
@gsmet maybe you can provide me with some workaround for the 2.16.5.Final version?
There isn't one
But as I see from the code source - there are no restrictions in the StaticResourcesRecorder for 2.16.5.Final version
You are right... Let me take a closer look
By the way, I still cannot access the reproducer link you provided. Please make sure it's not a private repo
Oops, sorry, my fault. Pls, try now.
It turns out this is a by design in Vert.x see
and
So there is not much we can do in Quarkus.
@cescoffier do we want to handle this in Vert.x or should this be closed as won't fix
?
Thanks @geoand, I found this issue in the vertx-web project and it is still in Open status.
Cool, let's close this one then
That would be it I think: https://github.com/quarkusio/quarkus/blob/main/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/StaticResourcesRecorder.java#L112-L115
@gsmet I hope you will add OPTIONS to the accept method despite the issue being closed )).
@gastaldi triage/backport* labels may not be added to an issue. Please add them to the corresponding pull request.
This message is automatically generated by a bot.
Describe the bug
I have static resources under the
/src/resources/META-INF/resources
folder (ex.: /src/resources/META-INF/resources/img/document.png.When I make a GET call for the resource - Qurkus responds with 200 OK and returns the resource But when I make an OPTIONS call for the same resource - Quarkus responds with 404 Not found
Expected behavior
I expected 200 OK on the OPTIONS request for the static resources.
Actual behavior
Quarkus responds with 404 Not found on the OPTIONS request for the static resources
How to Reproduce?
/src/resources/META-INF/resources
folderSample of RestAssured @QuarkusTest
Output of
uname -a
orver
linux, macOS, Windows
Output of
java -version
openjdk 17.0.2 2022-01-18
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.16.5.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d)
Additional information
No response