antonio     2004/06/26 17:44:35

  Modified:    .        status.xml
               src/java/org/apache/cocoon/components/pipeline
                        AbstractProcessingPipeline.java
  Log:
  Apply patch: Cached resources don't have Expires-Header.
  Bugzilla report: 17924
  Submitted by: Jorg Heymans
  
  Revision  Changes    Path
  1.373     +4 -1      cocoon-2.1/status.xml
  
  Index: status.xml
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/status.xml,v
  retrieving revision 1.372
  retrieving revision 1.373
  diff -u -r1.372 -r1.373
  --- status.xml        26 Jun 2004 08:41:18 -0000      1.372
  +++ status.xml        27 Jun 2004 00:44:35 -0000      1.373
  @@ -204,6 +204,9 @@
   
     <changes>
    <release version="@version@" date="@date@">
  +   <action dev="AG" type="fix" fixes-bug="17924" due-to="Jorg Heymans">
  +     Apply patch: Cached resources don't have Expires-Header.
  +   </action>
      <action dev="AG" type="fix" fixes-bug="29752" due-to="Leszek Gawron">
        Apply patch: Caching JXTemplateGenerator.
      </action>
  
  
  
  1.25      +9 -4      
cocoon-2.1/src/java/org/apache/cocoon/components/pipeline/AbstractProcessingPipeline.java
  
  Index: AbstractProcessingPipeline.java
  ===================================================================
  RCS file: 
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/pipeline/AbstractProcessingPipeline.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- AbstractProcessingPipeline.java   2 Jun 2004 20:11:35 -0000       1.24
  +++ AbstractProcessingPipeline.java   27 Jun 2004 00:44:35 -0000      1.25
  @@ -570,13 +570,19 @@
                   environment.setContentType(this.sitemapReaderMimeType);      
          
               } else {
                   final String mimeType = this.reader.getMimeType();
  -                if ( mimeType != null ) {
  +                if (mimeType != null) {
                       environment.setContentType(mimeType);                    
                   }
               }
  -
  +            // set the expires parameter on the pipeline if the reader is 
configured with one
  +            if (readerParam.isParameter("expires")) {
  +                 // should this checking be done somewhere else??
  +                 this.expires = readerParam.getParameterAsLong("expires");
  +            }
           } catch (SAXException e){
               throw new ProcessingException("Failed to execute reader 
pipeline.", e);
  +        } catch (ParameterException e) {
  +            throw new ProcessingException("Expires parameter needs to be of 
type long.",e);            
           } catch (IOException e){
               throw new ProcessingException("Failed to execute reader 
pipeline.", e);
           }
  @@ -587,7 +593,6 @@
       throws ProcessingException {
           // has the read resource been modified?
           if(!environment.isResponseModified(lastModified)) {
  -
               // environment supports this, so we are finished
               environment.setResponseIsNotModified();
               return true;
  
  
  

Reply via email to