Fixes #1434 - Improve properties in jetty-gzip.xml.
Added properties for syncFlush, includedMethodList and excludedMethodList.
This commit is contained in:
parent
7deb281aa0
commit
a9b4e2422a
|
@ -16,6 +16,7 @@
|
||||||
<Set name="checkGzExists"><Property name="jetty.gzip.checkGzExists" deprecated="gzip.checkGzExists" default="false"/></Set>
|
<Set name="checkGzExists"><Property name="jetty.gzip.checkGzExists" deprecated="gzip.checkGzExists" default="false"/></Set>
|
||||||
<Set name="compressionLevel"><Property name="jetty.gzip.compressionLevel" deprecated="gzip.compressionLevel" default="-1"/></Set>
|
<Set name="compressionLevel"><Property name="jetty.gzip.compressionLevel" deprecated="gzip.compressionLevel" default="-1"/></Set>
|
||||||
<Set name="inflateBufferSize"><Property name="jetty.gzip.inflateBufferSize" default="0"/></Set>
|
<Set name="inflateBufferSize"><Property name="jetty.gzip.inflateBufferSize" default="0"/></Set>
|
||||||
|
<Set name="syncFlush"><Property name="jetty.gzip.syncFlush" default="false" /></Set>
|
||||||
|
|
||||||
<Set name="excludedAgentPatterns">
|
<Set name="excludedAgentPatterns">
|
||||||
<Array type="String">
|
<Array type="String">
|
||||||
|
@ -23,43 +24,40 @@
|
||||||
</Array>
|
</Array>
|
||||||
</Set>
|
</Set>
|
||||||
|
|
||||||
|
<Set name="includedMethodList"><Property name="jetty.gzip.includedMethodList" default="GET" /></Set>
|
||||||
|
<Set name="excludedMethodList"><Property name="jetty.gzip.excludedMethodList" default="" /></Set>
|
||||||
|
|
||||||
|
<!--
|
||||||
<Set name="includedMethods">
|
<Set name="includedMethods">
|
||||||
<Array type="String">
|
<Array type="String">
|
||||||
<Item>GET</Item>
|
<Item>GET</Item>
|
||||||
</Array>
|
</Array>
|
||||||
</Set>
|
</Set>
|
||||||
|
|
||||||
<!--
|
|
||||||
<Set name="includedPaths">
|
<Set name="includedPaths">
|
||||||
<Array type="String">
|
<Array type="String">
|
||||||
<Item>/*</Item>
|
<Item>/*</Item>
|
||||||
</Array>
|
</Array>
|
||||||
</Set>
|
</Set>
|
||||||
-->
|
|
||||||
|
|
||||||
<!--
|
|
||||||
<Set name="excludedPaths">
|
<Set name="excludedPaths">
|
||||||
<Array type="String">
|
<Array type="String">
|
||||||
<Item>*.gz</Item>
|
<Item>*.gz</Item>
|
||||||
</Array>
|
</Array>
|
||||||
</Set>
|
</Set>
|
||||||
-->
|
|
||||||
|
|
||||||
<!--
|
|
||||||
<Call name="addIncludedMimeTypes">
|
<Call name="addIncludedMimeTypes">
|
||||||
<Arg><Array type="String">
|
<Arg><Array type="String">
|
||||||
<Item>some/type</Item>
|
<Item>some/type</Item>
|
||||||
</Array></Arg>
|
</Array></Arg>
|
||||||
</Call>
|
</Call>
|
||||||
-->
|
|
||||||
|
|
||||||
<!--
|
|
||||||
<Call name="addExcludedMimeTypes">
|
<Call name="addExcludedMimeTypes">
|
||||||
<Arg><Array type="String">
|
<Arg><Array type="String">
|
||||||
<Item>some/type</Item>
|
<Item>some/type</Item>
|
||||||
</Array></Arg>
|
</Array></Arg>
|
||||||
</Call>
|
</Call>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
</New>
|
</New>
|
||||||
</Arg>
|
</Arg>
|
||||||
|
|
|
@ -26,3 +26,9 @@ etc/jetty-gzip.xml
|
||||||
|
|
||||||
## Inflate request buffer size, or 0 for no request inflation
|
## Inflate request buffer size, or 0 for no request inflation
|
||||||
# jetty.gzip.inflateBufferSize=0
|
# jetty.gzip.inflateBufferSize=0
|
||||||
|
|
||||||
|
## Comma separated list of included methods
|
||||||
|
# jetty.gzip.includedMethodList=GET
|
||||||
|
|
||||||
|
## Comma separated list of excluded methods
|
||||||
|
# jetty.gzip.excludedMethodList=
|
||||||
|
|
|
@ -672,4 +672,24 @@ public class GzipHandler extends HandlerWrapper implements GzipFactory
|
||||||
{
|
{
|
||||||
_minGzipSize = minGzipSize;
|
_minGzipSize = minGzipSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setIncludedMethodList(String csvMethods)
|
||||||
|
{
|
||||||
|
setIncludedMethods(StringUtil.csvSplit(csvMethods));
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIncludedMethodList()
|
||||||
|
{
|
||||||
|
return String.join(",", getIncludedMethods());
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setExcludedMethodList(String csvMethods)
|
||||||
|
{
|
||||||
|
setExcludedMethods(StringUtil.csvSplit(csvMethods));
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getExcludedMethodList()
|
||||||
|
{
|
||||||
|
return String.join(",", getExcludedMethods());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue