Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Wilkins2015-07-17 02:28:48 -0400
committerGreg Wilkins2015-07-17 02:28:48 -0400
commitedc8bae5562ef0c8c6e5599cf6ac434315efe89e (patch)
treec5a3c782ad88108bfbbbc36015d48ae4894cb6db /jetty-servlets
parent9ee4b64e89da30a0177a7dc95291e8af92816f5e (diff)
downloadorg.eclipse.jetty.project-edc8bae5562ef0c8c6e5599cf6ac434315efe89e.tar.gz
org.eclipse.jetty.project-edc8bae5562ef0c8c6e5599cf6ac434315efe89e.tar.xz
org.eclipse.jetty.project-edc8bae5562ef0c8c6e5599cf6ac434315efe89e.zip
472781 - GzipHandler isMimeTypeGzipable() bad logic
Added utility classes: IncludeExclude - handles standard include exclude set RegexSet - A set of regular expressions that have a combined compiled pattern PathMap.PathSet - A set of standard path mappings
Diffstat (limited to 'jetty-servlets')
-rw-r--r--jetty-servlets/src/test/java/org/eclipse/jetty/server/handler/gzip/GzipDefaultTest.java15
1 files changed, 13 insertions, 2 deletions
diff --git a/jetty-servlets/src/test/java/org/eclipse/jetty/server/handler/gzip/GzipDefaultTest.java b/jetty-servlets/src/test/java/org/eclipse/jetty/server/handler/gzip/GzipDefaultTest.java
index c926bd4c29..96dbf03cbc 100644
--- a/jetty-servlets/src/test/java/org/eclipse/jetty/server/handler/gzip/GzipDefaultTest.java
+++ b/jetty-servlets/src/test/java/org/eclipse/jetty/server/handler/gzip/GzipDefaultTest.java
@@ -674,12 +674,13 @@ public class GzipDefaultTest
GzipTester tester = new GzipTester(testingdir,compressionType);
// Configure Gzip Handler
- tester.getGzipHandler().setExcludedPaths("*.txt");
- tester.getGzipHandler().setIncludedPaths("/file.txt");
+ tester.getGzipHandler().setExcludedPaths("/bad.txt");
+ tester.getGzipHandler().setIncludedPaths("*.txt");
// Prepare server file
int filesize = tester.getOutputBufferSize() * 4;
tester.prepareServerFile("file.txt",filesize);
+ tester.prepareServerFile("bad.txt",filesize);
// Set content servlet
tester.setContentServlet(DefaultServlet.class);
@@ -693,6 +694,16 @@ public class GzipDefaultTest
{
tester.stop();
}
+
+ try
+ {
+ tester.start();
+ assertIsResponseNotGzipCompressed(tester,"GET","bad.txt",filesize,HttpStatus.OK_200);
+ }
+ finally
+ {
+ tester.stop();
+ }
}
public HttpTester.Response assertIsResponseNotGzipCompressed(GzipTester tester, String method, String filename, int expectedFilesize, int status)

Back to the top