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

RESTEasy Reactive @NoCache unexpected behavior #19822

Closed
jsmrcka opened this issue Sep 1, 2021 · 2 comments · Fixed by #19823
Closed

RESTEasy Reactive @NoCache unexpected behavior #19822

jsmrcka opened this issue Sep 1, 2021 · 2 comments · Fixed by #19823
Assignees
Labels
area/rest kind/bug Something isn't working
Milestone

Comments

@jsmrcka
Copy link
Contributor

jsmrcka commented Sep 1, 2021

Describe the bug

When using org.jboss.resteasy.reactive.NoCache without attributes (not using the fields attribute), response headers do not contain Cache-Control: no-cache header.

package org.acme;

import javax.ws.rs.GET;
import javax.ws.rs.Path;

import org.jboss.resteasy.reactive.NoCache;

@Path("/hello")
public class NoCacheResource {

    @GET
    @NoCache
    public String hello() {
        return "hello";
    }
}
curl --head http://localhost:8080/hello

This is also inconsistent with the documentation:
https://quarkus.io/guides/resteasy-reactive#controlling-http-caching-features

Expected behavior

Response:

HTTP/1.1 200 OK
Cache-Control: no-cache
Content-Type: text/plain;charset=UTF-8

Actual behavior

Response:

HTTP/1.1 200 OK
Content-Type: text/plain;charset=UTF-8

How to Reproduce?

resteasy-reactive-nocache-reproducer.zip

unzip resteasy-reactive-nocache-reproducer.zip
cd resteasy-reactive-nocache-reproducer
./mvnw clean verify

Output of uname -a or ver

No response

Output of java -version

openjdk version "11.0.11" 2021-04-20 OpenJDK Runtime Environment AdoptOpenJDK-11.0.11+9 (build 11.0.11+9) OpenJDK 64-Bit Server VM AdoptOpenJDK-11.0.11+9 (build 11.0.11+9, mixed mode)

GraalVM version (if different from Java)

No response

Quarkus version or git rev

2.2.1.Final

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d)

Additional information

No response

@jsmrcka jsmrcka added the kind/bug Something isn't working label Sep 1, 2021
@quarkus-bot
Copy link

quarkus-bot bot commented Sep 1, 2021

/cc @FroMage, @geoand, @gwenneg, @stuartwdouglas

@geoand
Copy link
Contributor

geoand commented Sep 1, 2021

#19823 should take care of the problem and hopefully we can get it into 2.2.2.Final which is due early next week

gastaldi added a commit that referenced this issue Sep 1, 2021
Fix @nocache without fields handling in RESTEasy Reactive
@quarkus-bot quarkus-bot bot added this to the 2.3 - main milestone Sep 1, 2021
jsmrcka added a commit to jsmrcka/quarkus-test-suite that referenced this issue Sep 1, 2021
Related issue has been resolved in Quarkus upstream:
quarkusio/quarkus#19822
jsmrcka added a commit to jsmrcka/quarkus-test-suite that referenced this issue Sep 1, 2021
Related issue has been resolved in Quarkus upstream:
quarkusio/quarkus#19822
Sgitario pushed a commit to quarkus-qe/quarkus-test-suite that referenced this issue Sep 2, 2021
Related issue has been resolved in Quarkus upstream:
quarkusio/quarkus#19822
Sgitario pushed a commit to quarkus-qe/quarkus-test-suite that referenced this issue Sep 2, 2021
Related issue has been resolved in Quarkus upstream:
quarkusio/quarkus#19822
Sgitario added a commit to Sgitario/quarkus-test-suite that referenced this issue Sep 3, 2021
RHBQ will be based on 2.2.1.Final.
++ Disable HttpCachingResourceIT.shouldGetNoCacheUnqualified due to quarkusio/quarkus#19822
Sgitario added a commit to Sgitario/quarkus-test-suite that referenced this issue Sep 6, 2021
Due to this issue: quarkusio/quarkus#19875, we can't use 999-SNAPSHOT until is fixed, therefore Main will be based on 2.2.1.Final.

++ Daily actions and Quarkus Ecosystem will still use 999-SNAPSHOT to check out the status with 999-SNAPSHOT
++ Disable HttpCachingResourceIT.shouldGetNoCacheUnqualified due to quarkusio/quarkus#19822
@gsmet gsmet modified the milestones: 2.3 - main, 2.2.2.Final Sep 6, 2021
gsmet pushed a commit to gsmet/quarkus that referenced this issue Sep 6, 2021
gsmet pushed a commit to gsmet/quarkus that referenced this issue Sep 6, 2021
gsmet pushed a commit to gsmet/quarkus that referenced this issue Sep 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/rest kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants