-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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 broken text on Windows #19535
Comments
/cc @FroMage, @geoand, @stuartwdouglas |
Add `http/jaxrs-reactive`, which is a RESTEasy reactive equivalent of `http/jaxrs`. Notable differenes and limitations: - In a multipart POJO, Java type for `image` and `octet-stream` were changed from `InputStream` to `File` - `InputStream` is not supported by `resteasy-reactive`. - Test of a functionality provided by the `quarkus.resteasy.multipart.input-part.default-charset` property has been disabled for now - it is unsupported in `resteasy-reactive`. quarkusio/quarkus#19527 - [FIXED] Possible bug in `resteasy-reactive` - endpoints consuming `MULTIPART_FORM_DATA` cause build failure. quarkusio/quarkus#19404. - Tests dealing with `text/plain` request/response have been disabled on Windows due to a bug. quarkusio/quarkus#19535
Add `http/jaxrs-reactive`, which is a RESTEasy reactive equivalent of `http/jaxrs`. Notable differences and limitations: - In a multipart POJO, Java type for `image` and `octet-stream` were changed from `InputStream` to `File` - `InputStream` is not supported by `resteasy-reactive`. - Test of a functionality provided by the `quarkus.resteasy.multipart.input-part.default-charset` property has been disabled for now - it is unsupported in `resteasy-reactive`. quarkusio/quarkus#19527 - [FIXED] Possible bug in `resteasy-reactive` - endpoints consuming `MULTIPART_FORM_DATA` cause build failure. quarkusio/quarkus#19404. - Tests dealing with `text/plain` request/response have been disabled on Windows due to a bug. quarkusio/quarkus#19535
Add `http/jaxrs-reactive`, which is a RESTEasy reactive equivalent of `http/jaxrs`. Notable differences and limitations: - In a multipart POJO, Java type for `image` and `octet-stream` were changed from `InputStream` to `File` - `InputStream` is not supported by `resteasy-reactive`. - Test of a functionality provided by the `quarkus.resteasy.multipart.input-part.default-charset` property has been disabled for now - it is unsupported in `resteasy-reactive`. quarkusio/quarkus#19527 - [FIXED] Possible bug in `resteasy-reactive` - endpoints consuming `MULTIPART_FORM_DATA` cause build failure. quarkusio/quarkus#19404. - Tests dealing with `text/plain` request/response have been disabled on Windows due to a bug. quarkusio/quarkus#19535
This is actually a Restassured issue, if you extract the body as a byte array and compare the bytes the response is correct. For some reason Restassured is not respecting the content type when converting it to a string. |
I think the issue is that RESTEasy Reactive is not sending charset info in the response content type.
Compare it to the same application modified to use classic RESTEasy (notice the charset in the response content type):
REST Assured probably uses some kind of default when it does not receive the charset in the response. I think we should either properly document (https://quarkus.io/guides/resteasy-reactive) the need to manually specify the charset:
or make |
I swear when I looked in wireshark there was a content type in the response, although this may have been after I made some changes (I added the charset manually to the producer method). @geoand it looks like we don't default to UTF-8 and RESTEasy does (I think it is configurable). We should probably look at adding this. |
I'll have a look |
I don't see any configuration in Quarkus that controls this for RESTEasy. Futhermore after testing around a bit, I see that RESTEasy only adds the UTF-8 charset when the response is |
Add UTF-8 as charset when RESTEasy Reactive returns text/plain
Fixes: quarkusio#19535 (cherry picked from commit decd432)
Add `http/jaxrs-reactive`, which is a RESTEasy reactive equivalent of `http/jaxrs`. Notable differences and limitations: - In a multipart POJO, Java type for `image` and `octet-stream` were changed from `InputStream` to `File` - `InputStream` is not supported by `resteasy-reactive`. - Test of a functionality provided by the `quarkus.resteasy.multipart.input-part.default-charset` property has been disabled for now - it is unsupported in `resteasy-reactive`. quarkusio/quarkus#19527 - [FIXED] Possible bug in `resteasy-reactive` - endpoints consuming `MULTIPART_FORM_DATA` cause build failure. quarkusio/quarkus#19404. - Tests dealing with `text/plain` request/response have been disabled on Windows due to a bug. quarkusio/quarkus#19535
Describe the bug
In a Windows environment, RESTEasy Reactive endpoints do not preserve text charset between request and response.
Response:
The same goes for an endpoint accepting multipart data (see attached reproducer).
Expected behavior
No response
Actual behavior
No response
How to Reproduce?
resteasy-reactive-encoding-reproducer.zip
Output of
uname -a
orver
No response
Output of
java -version
openjdk version "11.0.11" 2021-04-20 OpenJDK Runtime Environment GraalVM CE 21.1.0 (build 11.0.11+8-jvmci-21.1-b05) OpenJDK 64-Bit Server VM GraalVM CE 21.1.0 (build 11.0.11+8-jvmci-21.1-b05, mixed mode, sharing)
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.1.3.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d) Maven home: C:\Users\hudson.m2\wrapper\dists\apache-maven-3.8.1-bin\2l5mhf2pq2clrde7f7qp1rdt5m\apache-maven-3.8.1 Java version: 11.0.11, vendor: GraalVM Community, runtime: C:\Program Files\GraalVM\graalvm-ce-java11-21.1.0 Default locale: en_US, platform encoding: Cp1252 OS name: "windows server 2019", version: "10.0", arch: "amd64", family: "windows"
Additional information
No response
The text was updated successfully, but these errors were encountered: