remm        2005/07/26 09:39:14

  Modified:    http11/src/java/org/apache/coyote/http11
                        Http11AprProcessor.java
               webapps/docs changelog.xml
  Log:
  - Small tweak: don't check the attribute if sendfile is disabled.
  
  Revision  Changes    Path
  1.27      +14 -12    
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java
  
  Index: Http11AprProcessor.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- Http11AprProcessor.java   25 Jul 2005 15:32:48 -0000      1.26
  +++ Http11AprProcessor.java   26 Jul 2005 16:39:14 -0000      1.27
  @@ -1553,18 +1553,20 @@
           }
   
           // Sendfile support
  -        String fileName = (String) 
request.getAttribute("org.apache.tomcat.sendfile.filename");
  -        if (fileName != null) {
  -            // No entity body sent here
  -            outputBuffer.addActiveFilter
  -                (outputFilters[Constants.VOID_FILTER]);
  -            contentDelimitation = true;
  -            sendfileData = new AprEndpoint.SendfileData();
  -            sendfileData.fileName = fileName;
  -            sendfileData.start = 
  -                ((Long) 
request.getAttribute("org.apache.tomcat.sendfile.start")).longValue();
  -            sendfileData.end = 
  -                ((Long) 
request.getAttribute("org.apache.tomcat.sendfile.end")).longValue();
  +        if (endpoint.getUseSendfile()) {
  +            String fileName = (String) 
request.getAttribute("org.apache.tomcat.sendfile.filename");
  +            if (fileName != null) {
  +                // No entity body sent here
  +                outputBuffer.addActiveFilter
  +                    (outputFilters[Constants.VOID_FILTER]);
  +                contentDelimitation = true;
  +                sendfileData = new AprEndpoint.SendfileData();
  +                sendfileData.fileName = fileName;
  +                sendfileData.start = 
  +                    ((Long) 
request.getAttribute("org.apache.tomcat.sendfile.start")).longValue();
  +                sendfileData.end = 
  +                    ((Long) 
request.getAttribute("org.apache.tomcat.sendfile.end")).longValue();
  +            }
           }
           
           // Check for compression
  
  
  
  1.340     +3 -0      jakarta-tomcat-catalina/webapps/docs/changelog.xml
  
  Index: changelog.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/changelog.xml,v
  retrieving revision 1.339
  retrieving revision 1.340
  diff -u -r1.339 -r1.340
  --- changelog.xml     26 Jul 2005 16:13:33 -0000      1.339
  +++ changelog.xml     26 Jul 2005 16:39:14 -0000      1.340
  @@ -55,6 +55,9 @@
         <fix>
           Add missing tomcatAuthentication attribute to the AJP APR 
implementation. (remm)
         </fix>
  +      <fix>
  +        Check filename sendfile attribute only if sendfile is enabled. (remm)
  +      </fix>
        </changelog>
     </subsection>
   
  
  
  

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

Reply via email to