-
Bug
-
Resolution: Done
-
Blocker
-
7.4.6.CR1
Using a gzip filter-ref in undertow config ....
<subsystem xmlns="urn:jboss:domain:undertow:12.0" default-server="default-server" default-virtual-host="default-host" default-servlet-container="default" default-security-domain="other" statistics-enabled="${wildfly.undertow.statistics-enabled:${wildfly.statistics-enabled:false}}"> <buffer-cache name="default"/> <server name="default-server"> <http-listener name="default" socket-binding="http" redirect-socket="https" enable-http2="true"/> <https-listener name="https" socket-binding="https" security-realm="ApplicationRealm" enable-http2="true"/> <host name="default-host" alias="localhost"> <location name="/" handler="welcome-content"/> <access-log/> <filter-ref name="gzip-filter"/> <http-invoker security-realm="ApplicationRealm"/> </host> </server> <servlet-container name="default"> <jsp-config/> <websockets/> </servlet-container> <handlers> <file name="welcome-content" path="${jboss.home.dir}/welcome-content"/> </handlers> <filters> <gzip name="gzip-filter"/> </filters> </subsystem>
the following test fails with ....
java.lang.AssertionError: Content-Encoding header should be defined
@Test public void gzipDefaultAsOnDemandBehaviourTest(@ArquillianResource URL url) throws { String targetUrl = url.toExternalForm() + "index.html"; HttpHead standardRequest = new HttpHead(targetUrl); HttpHead gzipExplicitRequest = new HttpHead(targetUrl); gzipExplicitRequest.addHeader(Headers.ACCEPT_ENCODING_STRING, "gzip"); HttpHead gzipDeflateExplicitRequest = new HttpHead(targetUrl); gzipDeflateExplicitRequest.addHeader(Headers.ACCEPT_ENCODING_STRING, "gzip"); gzipDeflateExplicitRequest.addHeader(Headers.ACCEPT_ENCODING_STRING, "deflate"); String compressionType="gzip"; try (CloseableHttpClient httpClient = HttpClientBuilder.create().disableContentCompression().build()) { CloseableHttpResponse response = httpClient.execute(gzipDeflateExplicitRequest); Assert.assertEquals(HttpURLConnection.HTTP_OK, response.getStatusLine().getStatusCode()); Header contentEncodingHeader = response.getFirstHeader(Headers.CONTENT_ENCODING_STRING); Assert.assertNotNull("Content-Encoding header should be defined", contentEncodingHeader); Assert.assertEquals("Content-Encoding header should be defined with value '" + compressionType.toLowerCase() + "'", compressionType.toLowerCase(), contentEncodingHeader.getValue().toLowerCase()); } }
- is caused by
-
UNDERTOW-2116 ServletOutputStreamImpl incorrectly sets Content-Length to 0
- Closed
- is incorporated by
-
JBEAP-23806 [QA](7.4.z) Upgrade Undertow from 2.2.18.SP1-redhat-00001 to 2.2.18.SP2
- Closed