Author: remy.maucherat(a)jboss.com
Date: 2012-02-29 03:29:01 -0500 (Wed, 29 Feb 2012)
New Revision: 1987
Modified:
trunk/java/org/apache/coyote/http11/Http11AprProtocol.java
trunk/java/org/apache/coyote/http11/Http11Protocol.java
Log:
AS7-3953: Add system properties for lesser used configuration options of the HTTP
connector.
Modified: trunk/java/org/apache/coyote/http11/Http11AprProtocol.java
===================================================================
--- trunk/java/org/apache/coyote/http11/Http11AprProtocol.java 2012-02-27 16:44:56 UTC
(rev 1986)
+++ trunk/java/org/apache/coyote/http11/Http11AprProtocol.java 2012-02-29 08:29:01 UTC
(rev 1987)
@@ -320,7 +320,7 @@
/**
* Maximum size of the HTTP message header.
*/
- protected int maxHttpHeaderSize = 8 * 1024;
+ protected int maxHttpHeaderSize =
Integer.valueOf(System.getProperty("org.apache.coyote.http11.Http11Protocol.MAX_HEADER_SIZE",
"8192")).intValue();
public int getMaxHttpHeaderSize() { return maxHttpHeaderSize; }
public void setMaxHttpHeaderSize(int valueI) { maxHttpHeaderSize = valueI; }
@@ -338,25 +338,25 @@
/**
* Integrated compression support.
*/
- protected String compression = "off";
+ protected String compression =
System.getProperty("org.apache.coyote.http11.Http11Protocol.COMPRESSION",
"off");
public String getCompression() { return compression; }
public void setCompression(String valueS) { compression = valueS; }
// HTTP
- protected String noCompressionUserAgents = null;
+ protected String noCompressionUserAgents =
System.getProperty("org.apache.coyote.http11.Http11Protocol.COMPRESSION_RESTRICTED_UA");
public String getNoCompressionUserAgents() { return noCompressionUserAgents; }
public void setNoCompressionUserAgents(String valueS) { noCompressionUserAgents =
valueS; }
// HTTP
- protected String compressableMimeTypes = "text/html,text/xml,text/plain";
+ protected String compressableMimeTypes =
System.getProperty("org.apache.coyote.http11.Http11Protocol.COMPRESSION_MIME_TYPES",
"text/html,text/xml,text/plain");
public String getCompressableMimeType() { return compressableMimeTypes; }
public void setCompressableMimeType(String valueS) { compressableMimeTypes = valueS;
}
// HTTP
- protected int compressionMinSize = 2048;
+ protected int compressionMinSize =
Integer.valueOf(System.getProperty("org.apache.coyote.http11.Http11Protocol.COMPRESSION_MIN_SIZE",
"2048")).intValue();
public int getCompressionMinSize() { return compressionMinSize; }
public void setCompressionMinSize(int valueI) { compressionMinSize = valueI; }
@@ -402,7 +402,7 @@
/**
* Server header.
*/
- protected String server;
+ protected String server =
System.getProperty("org.apache.coyote.http11.Http11Protocol.SERVER");
public void setServer( String server ) { this.server = server; }
public String getServer() { return server; }
Modified: trunk/java/org/apache/coyote/http11/Http11Protocol.java
===================================================================
--- trunk/java/org/apache/coyote/http11/Http11Protocol.java 2012-02-27 16:44:56 UTC (rev
1986)
+++ trunk/java/org/apache/coyote/http11/Http11Protocol.java 2012-02-29 08:29:01 UTC (rev
1987)
@@ -376,7 +376,7 @@
/**
* Maximum size of the HTTP message header.
*/
- protected int maxHttpHeaderSize = 8 * 1024;
+ protected int maxHttpHeaderSize =
Integer.valueOf(System.getProperty("org.apache.coyote.http11.Http11Protocol.MAX_HEADER_SIZE",
"8192")).intValue();
public int getMaxHttpHeaderSize() { return maxHttpHeaderSize; }
public void setMaxHttpHeaderSize(int valueI) { maxHttpHeaderSize = valueI; }
@@ -395,25 +395,25 @@
/**
* Integrated compression support.
*/
- protected String compression = "off";
+ protected String compression =
System.getProperty("org.apache.coyote.http11.Http11Protocol.COMPRESSION",
"off");
public String getCompression() { return compression; }
public void setCompression(String valueS) { compression = valueS; }
// HTTP
- protected String noCompressionUserAgents = null;
+ protected String noCompressionUserAgents =
System.getProperty("org.apache.coyote.http11.Http11Protocol.COMPRESSION_RESTRICTED_UA");
public String getNoCompressionUserAgents() { return noCompressionUserAgents; }
public void setNoCompressionUserAgents(String valueS) { noCompressionUserAgents =
valueS; }
// HTTP
- protected String compressableMimeTypes = "text/html,text/xml,text/plain";
+ protected String compressableMimeTypes =
System.getProperty("org.apache.coyote.http11.Http11Protocol.COMPRESSION_MIME_TYPES",
"text/html,text/xml,text/plain");
public String getCompressableMimeType() { return compressableMimeTypes; }
public void setCompressableMimeType(String valueS) { compressableMimeTypes = valueS;
}
// HTTP
- protected int compressionMinSize = 2048;
+ protected int compressionMinSize =
Integer.valueOf(System.getProperty("org.apache.coyote.http11.Http11Protocol.COMPRESSION_MIN_SIZE",
"2048")).intValue();
public int getCompressionMinSize() { return compressionMinSize; }
public void setCompressionMinSize(int valueI) { compressionMinSize = valueI; }
@@ -430,7 +430,7 @@
/**
* Server header.
*/
- protected String server;
+ protected String server =
System.getProperty("org.apache.coyote.http11.Http11Protocol.SERVER");
public void setServer( String server ) { this.server = server; }
public String getServer() { return server; }
Show replies by date