We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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 returns status code 200 instead of 307 when verifying the Response.temporaryRedirect with RestAssured
status code 307 should be returned
a 200 status code is returned
run the test GreetingResourceTest
in this repo https://github.com/s0l0c0ding/bug-resteasy-restassured
Steps to reproduce the behavior:
no special configuration
(If applicable, add screenshots to help explain your problem.)
uname -a
ver
Linux pc 5.8.0-44-generic #50~20.04.1-Ubuntu SMP Wed Feb 10 21:07:30 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
java -version
openjdk version "11.0.10" 2021-01-19 OpenJDK Runtime Environment (build 11.0.10+9-Ubuntu-0ubuntu1.20.04) OpenJDK 64-Bit Server VM (build 11.0.10+9-Ubuntu-0ubuntu1.20.04, mixed mode, sharing)
1.12.2.Final
mvn
a correct response is given when trying with browser
The text was updated successfully, but these errors were encountered:
There is no bug in either RESTEasy or RestAssured, it's just how RestAssured behaves - it follows redirects by default.
You can update your test method to
@Test public void testHelloEndpoint() { given() .config(config().redirect(redirectConfig().followRedirects(false))) .when().get("/hello-resteasy") .then() .statusCode(307); }
if you don't want to follow redirects
Sorry, something went wrong.
thanks for the hint
No branches or pull requests
Describe the bug
RestEasy returns status code 200 instead of 307 when verifying the Response.temporaryRedirect with RestAssured
Expected behavior
status code 307 should be returned
Actual behavior
a 200 status code is returned
To Reproduce
run the test GreetingResourceTest
in this repo https://github.com/s0l0c0ding/bug-resteasy-restassured
Steps to reproduce the behavior:
Configuration
no special configuration
Screenshots
(If applicable, add screenshots to help explain your problem.)
Environment (please complete the following information):
Output of
uname -a
orver
Linux pc 5.8.0-44-generic #50~20.04.1-Ubuntu SMP Wed Feb 10 21:07:30 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Output of
java -version
openjdk version "11.0.10" 2021-01-19
OpenJDK Runtime Environment (build 11.0.10+9-Ubuntu-0ubuntu1.20.04)
OpenJDK 64-Bit Server VM (build 11.0.10+9-Ubuntu-0ubuntu1.20.04, mixed mode, sharing)
GraalVM version (if different from Java)
Quarkus version or git rev
1.12.2.Final
Build tool
mvn
Additional context
a correct response is given when trying with browser
The text was updated successfully, but these errors were encountered: