You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I have written a @webfilter (using HttpServletResponseWrapper) that wants to modify/rewrite a response (see code at end of issue description). The implementation works fine when quarkus is running "normally"; it is not working when running via "quarkus:dev".
It is not possible to modify the the contentLength, contentType or body. The browser receives the original headers but no body; so, just waits to load the body endlessly. It seems the response is already commited/sent to the client.
Expected behavior
The Filter should be able to modify the headers and body.
E.g. for index.html return body "hello world" and content-type "text/plain".
Actual behavior
Headers sent to the client are the ones of the orginal response as set by
filterChain.doFilter(request, wrappedResp);
It see the response is already commited and has started to be sent to the client.
To Reproduce
Steps to reproduce the behavior:
Set up a simple quarkus project containing a dependency to quarkus-undertow
Add the attached code.
Run with mvn compile quarkus:dev
Try to open localhost:8080/index.html
Instead of showing the index.html, "hello world" should be printed as text/plain.
Configuration
# empty
Screenshots
Environment (please complete the following information):
Describe the bug
I have written a @webfilter (using HttpServletResponseWrapper) that wants to modify/rewrite a response (see code at end of issue description). The implementation works fine when quarkus is running "normally"; it is not working when running via "quarkus:dev".
It is not possible to modify the the contentLength, contentType or body. The browser receives the original headers but no body; so, just waits to load the body endlessly. It seems the response is already commited/sent to the client.
Expected behavior
The Filter should be able to modify the headers and body.
E.g. for index.html return body "hello world" and content-type "text/plain".
Actual behavior
Headers sent to the client are the ones of the orginal response as set by
filterChain.doFilter(request, wrappedResp);
It see the response is already commited and has started to be sent to the client.
To Reproduce
Steps to reproduce the behavior:
Instead of showing the index.html, "hello world" should be printed as text/plain.
Configuration
# empty
Screenshots
Environment (please complete the following information):
uname -a
orver
: Linux hedgehog 4.9.0-12-amd64 Switch to the Maven distributed copy of the SubstrateVM annotations #1 SMP Debian 4.9.210-1 (2020-01-20) x86_64 GNU/Linuxjava -version
: openjdk version "13" 2019-09-17OpenJDK Runtime Environment (build 13+33)
OpenJDK 64-Bit Server VM (build 13+33, mixed mode, sharing)
mvnw --version
orgradlew --version
): Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)Maven home: /home/daniel/.m2/wrapper/dists/apache-maven-3.6.3-bin/1iopthnavndlasol9gbrbg6bf2/apache-maven-3.6.3
Java version: 13, vendor: Oracle Corporation, runtime: /home/daniel/.sdkman/candidates/java/13.0.0-open
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.9.0-12-amd64", arch: "amd64", family: "unix"
Additional context
The Filter implementation:
package org.acme;
The text was updated successfully, but these errors were encountered: