remm        2002/12/19 01:19:06

  Modified:    http11/src/java/org/apache/coyote/http11
                        Http11Processor.java
  Log:
  - Same, but without the tabs ;-)
  
  Revision  Changes    Path
  1.50      +17 -17    
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Processor.java
  
  Index: Http11Processor.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Processor.java,v
  retrieving revision 1.49
  retrieving revision 1.50
  diff -u -r1.49 -r1.50
  --- Http11Processor.java      19 Dec 2002 09:13:16 -0000      1.49
  +++ Http11Processor.java      19 Dec 2002 09:19:06 -0000      1.50
  @@ -982,25 +982,25 @@
                   request.getMimeHeaders().getValue("accept-encoding");
               if ((acceptEncodingMB != null) 
                   && (acceptEncodingMB.indexOf("gzip") != -1)) {
  -                     
  +
                   // Check in content is not allready gzipped
                   MessageBytes contentEncodingMB =
  -                                     
response.getMimeHeaders().getValue("Content-Encoding");
  -                                     
  -             if ((contentEncodingMB == null) 
  -                     || (contentEncodingMB.indexOf("gzip") == -1))
  -                {                    
  -                     // Check content-type
  -                     if (compressionLevel == 1) {
  -                         int contentLength = response.getContentLength();
  -                         // FIXME: Make the value configurable
  -                         if ((contentLength == -1) || (contentLength > 
compressionMinSize)) {
  -                             useCompression = 
  -                                 response.getContentType().startsWith("text/");
  -                         }
  -                     } else {
  -                         useCompression = true;
  -                     }
  +                    response.getMimeHeaders().getValue("Content-Encoding");
  +
  +                if ((contentEncodingMB == null) 
  +                    || (contentEncodingMB.indexOf("gzip") == -1)){
  +                    // Check content-type
  +                    if (compressionLevel == 1) {
  +                        int contentLength = response.getContentLength();
  +                        // FIXME: Make the value configurable
  +                        if ((contentLength == -1) 
  +                            || (contentLength > compressionMinSize)) {
  +                            useCompression = 
  +                                response.getContentType().startsWith("text/");
  +                        }
  +                    } else {
  +                        useCompression = true;
  +                    }
                   }
                   
                   // Change content-length to -1 to force chunking
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to