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 #408

Closed
snowdrop-bot opened this issue Sep 1, 2021 · 0 comments
Closed

RESTEasy Reactive @NoCache unexpected behavior #408

snowdrop-bot opened this issue Sep 1, 2021 · 0 comments
Assignees
Labels
7 - Community development upstream/closed The issue has been closed in the upstream repository

Comments

@snowdrop-bot
Copy link
Collaborator

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


quarkusio#19822


$upstream:19822$

@snowdrop-bot snowdrop-bot added the upstream/closed The issue has been closed in the upstream repository label Sep 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
7 - Community development upstream/closed The issue has been closed in the upstream repository
Projects
None yet
Development

No branches or pull requests

2 participants