Merge remote-tracking branch 'origin/jetty-7' into jetty-8

This commit is contained in:
Greg Wilkins 2013-07-04 14:59:55 +10:00
commit 37de67d3d7
1 changed files with 3 additions and 0 deletions

View File

@ -116,12 +116,15 @@ public class GzipTester
// Response headers should have either a Transfer-Encoding indicating chunked OR a Content-Length
String contentLength = response.getHeader("Content-Length");
String transferEncoding = response.getHeader("Transfer-Encoding");
/* TODO need to check for the 3rd option of EOF content. To do this properly you might need to look at both HTTP/1.1 and HTTP/1.0 requests
boolean chunked = (transferEncoding != null) && (transferEncoding.indexOf("chunk") >= 0);
if(!chunked) {
Assert.assertThat("Response.header[Content-Length]",contentLength,notNullValue());
} else {
Assert.assertThat("Response.header[Transfer-Encoding]",transferEncoding,notNullValue());
}
*/
int qindex = compressionType.indexOf(";");
if (qindex < 0)