Merge branch 'master' of ssh://git.eclipse.org/gitroot/jetty/org.eclipse.jetty.project
This commit is contained in:
commit
9c0497120b
|
@ -218,14 +218,14 @@ public class GzipFilter extends UserAgentFilter
|
||||||
{
|
{
|
||||||
StringTokenizer tok = new StringTokenizer(tmp,",",false);
|
StringTokenizer tok = new StringTokenizer(tmp,",",false);
|
||||||
while (tok.hasMoreTokens())
|
while (tok.hasMoreTokens())
|
||||||
_mimeTypes.add(tok.nextToken());
|
_mimeTypes.add(tok.nextToken().trim());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
StringTokenizer tok = new StringTokenizer(tmp,",",false);
|
StringTokenizer tok = new StringTokenizer(tmp,",",false);
|
||||||
while (tok.hasMoreTokens())
|
while (tok.hasMoreTokens())
|
||||||
_mimeTypes.add(tok.nextToken());
|
_mimeTypes.add(tok.nextToken().trim());
|
||||||
}
|
}
|
||||||
tmp=filterConfig.getInitParameter("excludedAgents");
|
tmp=filterConfig.getInitParameter("excludedAgents");
|
||||||
if (tmp!=null)
|
if (tmp!=null)
|
||||||
|
@ -233,7 +233,7 @@ public class GzipFilter extends UserAgentFilter
|
||||||
_excludedAgents=new HashSet<String>();
|
_excludedAgents=new HashSet<String>();
|
||||||
StringTokenizer tok = new StringTokenizer(tmp,",",false);
|
StringTokenizer tok = new StringTokenizer(tmp,",",false);
|
||||||
while (tok.hasMoreTokens())
|
while (tok.hasMoreTokens())
|
||||||
_excludedAgents.add(tok.nextToken());
|
_excludedAgents.add(tok.nextToken().trim());
|
||||||
}
|
}
|
||||||
|
|
||||||
tmp=filterConfig.getInitParameter("excludeAgentPatterns");
|
tmp=filterConfig.getInitParameter("excludeAgentPatterns");
|
||||||
|
@ -242,7 +242,7 @@ public class GzipFilter extends UserAgentFilter
|
||||||
_excludedAgentPatterns=new HashSet<Pattern>();
|
_excludedAgentPatterns=new HashSet<Pattern>();
|
||||||
StringTokenizer tok = new StringTokenizer(tmp,",",false);
|
StringTokenizer tok = new StringTokenizer(tmp,",",false);
|
||||||
while (tok.hasMoreTokens())
|
while (tok.hasMoreTokens())
|
||||||
_excludedAgentPatterns.add(Pattern.compile(tok.nextToken()));
|
_excludedAgentPatterns.add(Pattern.compile(tok.nextToken().trim()));
|
||||||
}
|
}
|
||||||
|
|
||||||
tmp=filterConfig.getInitParameter("excludePaths");
|
tmp=filterConfig.getInitParameter("excludePaths");
|
||||||
|
@ -251,7 +251,7 @@ public class GzipFilter extends UserAgentFilter
|
||||||
_excludedPaths=new HashSet<String>();
|
_excludedPaths=new HashSet<String>();
|
||||||
StringTokenizer tok = new StringTokenizer(tmp,",",false);
|
StringTokenizer tok = new StringTokenizer(tmp,",",false);
|
||||||
while (tok.hasMoreTokens())
|
while (tok.hasMoreTokens())
|
||||||
_excludedPaths.add(tok.nextToken());
|
_excludedPaths.add(tok.nextToken().trim());
|
||||||
}
|
}
|
||||||
|
|
||||||
tmp=filterConfig.getInitParameter("excludePathPatterns");
|
tmp=filterConfig.getInitParameter("excludePathPatterns");
|
||||||
|
@ -260,7 +260,7 @@ public class GzipFilter extends UserAgentFilter
|
||||||
_excludedPathPatterns=new HashSet<Pattern>();
|
_excludedPathPatterns=new HashSet<Pattern>();
|
||||||
StringTokenizer tok = new StringTokenizer(tmp,",",false);
|
StringTokenizer tok = new StringTokenizer(tmp,",",false);
|
||||||
while (tok.hasMoreTokens())
|
while (tok.hasMoreTokens())
|
||||||
_excludedPathPatterns.add(Pattern.compile(tok.nextToken()));
|
_excludedPathPatterns.add(Pattern.compile(tok.nextToken().trim()));
|
||||||
}
|
}
|
||||||
|
|
||||||
tmp=filterConfig.getInitParameter("vary");
|
tmp=filterConfig.getInitParameter("vary");
|
||||||
|
|
|
@ -117,7 +117,7 @@ public class GzipFilterDefaultTest
|
||||||
|
|
||||||
FilterHolder holder = tester.setContentServlet(GetServlet.class);
|
FilterHolder holder = tester.setContentServlet(GetServlet.class);
|
||||||
holder.setInitParameter("mimeTypes","text/plain");
|
holder.setInitParameter("mimeTypes","text/plain");
|
||||||
holder.setInitParameter("methods","POST,WIBBLE");
|
holder.setInitParameter("methods","POST, WIBBLE");
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -441,7 +441,7 @@ public class GzipFilterDefaultTest
|
||||||
GzipTester tester = new GzipTester(testingdir,compressionType);
|
GzipTester tester = new GzipTester(testingdir,compressionType);
|
||||||
|
|
||||||
FilterHolder holder = tester.setContentServlet(DefaultServlet.class);
|
FilterHolder holder = tester.setContentServlet(DefaultServlet.class);
|
||||||
holder.setInitParameter("excludedAgents","foo");
|
holder.setInitParameter("excludedAgents","bar, foo");
|
||||||
tester.setUserAgent("foo");
|
tester.setUserAgent("foo");
|
||||||
|
|
||||||
int filesize = CompressedResponseWrapper.DEFAULT_BUFFER_SIZE * 4;
|
int filesize = CompressedResponseWrapper.DEFAULT_BUFFER_SIZE * 4;
|
||||||
|
@ -488,7 +488,7 @@ public class GzipFilterDefaultTest
|
||||||
GzipTester tester = new GzipTester(testingdir,compressionType);
|
GzipTester tester = new GzipTester(testingdir,compressionType);
|
||||||
|
|
||||||
FilterHolder holder = tester.setContentServlet(DefaultServlet.class);
|
FilterHolder holder = tester.setContentServlet(DefaultServlet.class);
|
||||||
holder.setInitParameter("excludePaths","/context/");
|
holder.setInitParameter("excludePaths","/bar/, /context/");
|
||||||
|
|
||||||
int filesize = CompressedResponseWrapper.DEFAULT_BUFFER_SIZE * 4;
|
int filesize = CompressedResponseWrapper.DEFAULT_BUFFER_SIZE * 4;
|
||||||
tester.prepareServerFile("file.txt",filesize);
|
tester.prepareServerFile("file.txt",filesize);
|
||||||
|
|
Loading…
Reference in New Issue