mirror of
https://github.com/jetty/jetty.project.git
synced 2025-02-28 19:09:10 +00:00
jetty-9 gzip tests handle HTTP/1.0 EOF content
This commit is contained in:
parent
54d6739879
commit
6e9bea1938
@ -32,6 +32,7 @@ import org.eclipse.jetty.servlet.DefaultServlet;
|
||||
import org.eclipse.jetty.servlet.FilterHolder;
|
||||
import org.eclipse.jetty.servlets.gzip.GzipTester;
|
||||
import org.eclipse.jetty.toolchain.test.TestingDir;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
@ -290,9 +290,13 @@ public class GzipTester
|
||||
Assert.assertThat("Response.status",response.getStatus(),is(status));
|
||||
if (expectedFilesize != (-1))
|
||||
{
|
||||
Assert.assertThat("Response.header[Content-Length]",response.get("Content-Length"),notNullValue());
|
||||
int serverLength = Integer.parseInt(response.get("Content-Length"));
|
||||
Assert.assertThat("Response.header[Content-Length]",serverLength,is(expectedFilesize));
|
||||
Assert.assertEquals(expectedFilesize,response.getContentBytes().length);
|
||||
String cl=response.get("Content-Length");
|
||||
if (cl!=null)
|
||||
{
|
||||
int serverLength = Integer.parseInt(response.get("Content-Length"));
|
||||
Assert.assertEquals(serverLength,expectedFilesize);
|
||||
}
|
||||
}
|
||||
Assert.assertThat("Response.header[Content-Encoding]",response.get("Content-Encoding"),not(containsString(compressionType)));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user