tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hgo...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11 Http11Protocol.java
Date Wed, 01 Oct 2003 07:53:05 GMT
hgomez      2003/10/01 00:53:05

  Modified:    http11/src/java/org/apache/coyote/http11 Http11Protocol.java
  Log:
  GZIP configuration in server.xml is forwarded to HTTP11Processor
  
  Revision  Changes    Path
  1.39      +28 -5     jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java
  
  Index: Http11Protocol.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- Http11Protocol.java	25 Sep 2003 11:08:17 -0000	1.38
  +++ Http11Protocol.java	1 Oct 2003 07:53:05 -0000	1.39
  @@ -255,7 +255,10 @@
        * Compression value.
        */
       private String compression = "off";
  -
  +	private String noCompressionUserAgents = null;
  +	private String compressableMimeTypes = "text/html,text/xml,text/plain";
  +	private int	compressionMinSize    = 2048;
  +	
       // -------------------- Pool setup --------------------
   
       public void setPools( boolean t ) {
  @@ -324,10 +327,27 @@
           socketBuffer = valueI;
       }
   
  -    public void setCompression(String valueS) {
  -        compression = valueS;
  -    }
  +	public void setCompression(String valueS) {
  +		compression = valueS;
  +		setAttribute("compression", valueS);
  +	}
  +
  +	public void setNoCompressionUserAgents(String valueS) {
  +		noCompressionUserAgents = valueS;
  +		setAttribute("noCompressionUserAgents", valueS);
  +	}
  +
  +	public void setCompressableMimeType(String valueS) {
  +		compressableMimeTypes = valueS;
  +		setAttribute("compressableMimeTypes", valueS);
  +	}
  +
  +	public void setCompressionMinSize(int valueI) {
  +		compressionMinSize = valueI;
  +		setAttribute("compressionMinSize", "" + valueI);
  +	}
   
  +	
       public void setSoLinger( int i ) {
   	ep.setSoLinger( i );
           setAttribute("soLinger", "" + i);
  @@ -468,7 +488,10 @@
               processor.setMaxKeepAliveRequests( proto.maxKeepAliveRequests );
               processor.setTimeout( proto.timeout );
               processor.setDisableUploadTimeout( proto.disableUploadTimeout );
  -            processor.setCompression( proto.compression );
  +			processor.setCompression( proto.compression );
  +			processor.setCompressionMinSize( proto.compressionMinSize);			
  +			processor.setNoCompressionUserAgents( proto.noCompressionUserAgents);
  +			processor.setCompressableMimeTypes( proto.compressableMimeTypes);
               processor.setSocketBuffer( proto.socketBuffer );
   
               thData[Http11Protocol.THREAD_DATA_PROCESSOR]=processor;
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message