cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject cvs commit: cocoon-2.1/src/java/org/apache/cocoon/components/treeprocessor TreeProcessor.java
Date Thu, 11 Mar 2004 14:21:57 GMT
cziegeler    2004/03/11 06:21:57

  Modified:    .        status.xml
               src/java/org/apache/cocoon/environment/wrapper
                        EnvironmentWrapper.java RequestWrapper.java
               src/java/org/apache/cocoon/components/treeprocessor
                        TreeProcessor.java
  Log:
       An internal redirect is now handled the same way as an external redirect would be handled.
       This includes that the error handler of the called pipeline is invoked in case of an
error.
  
  Revision  Changes    Path
  1.274     +5 -1      cocoon-2.1/status.xml
  
  Index: status.xml
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/status.xml,v
  retrieving revision 1.273
  retrieving revision 1.274
  diff -u -r1.273 -r1.274
  --- status.xml	11 Mar 2004 09:56:47 -0000	1.273
  +++ status.xml	11 Mar 2004 14:21:56 -0000	1.274
  @@ -210,6 +210,10 @@
     <changes>
   
    <release version="@version@" date="@date@">
  +   <action dev="CZ" type="update">
  +     An internal redirect is now handled the same way as an external redirect would be
handled.
  +     This includes that the error handler of the called pipeline is invoked in case of
an error.
  +   </action>
      <action dev="CZ" type="update" fixes-bug="27188" due-to-email="durdina@asset.sk">
        Set the default encoding for the Portlet Environment.
      </action>
  
  
  
  1.14      +10 -2     cocoon-2.1/src/java/org/apache/cocoon/environment/wrapper/EnvironmentWrapper.java
  
  Index: EnvironmentWrapper.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/environment/wrapper/EnvironmentWrapper.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- EnvironmentWrapper.java	5 Mar 2004 13:02:55 -0000	1.13
  +++ EnvironmentWrapper.java	11 Mar 2004 14:21:56 -0000	1.14
  @@ -71,6 +71,8 @@
       
       protected String contentType;
   
  +    protected boolean external = false;
  +    
       /**
        * Constructs an EnvironmentWrapper object from a Request
        * and Response objects
  @@ -452,7 +454,13 @@
        * Always return <code>false</code>.
        */
       public boolean isExternal() {
  -        return false;
  +        return this.external;
       }
   
  +    public void setExternal(boolean flag) {
  +        this.external = flag;
  +        if ( flag ) {
  +            ((RequestWrapper)this.request).setRequestURI(this.prefix.toString(), this.uris);
  +        }
  +    }
   }
  
  
  
  1.7       +14 -2     cocoon-2.1/src/java/org/apache/cocoon/environment/wrapper/RequestWrapper.java
  
  Index: RequestWrapper.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/environment/wrapper/RequestWrapper.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- RequestWrapper.java	5 Mar 2004 13:02:55 -0000	1.6
  +++ RequestWrapper.java	11 Mar 2004 14:21:56 -0000	1.7
  @@ -54,6 +54,9 @@
       /** raw mode? **/
       private final boolean rawMode;
   
  +    /** The request uri */
  +    private String requestURI;
  +    
       /**
        * Constructor
        */
  @@ -83,6 +86,7 @@
               else
                   this.queryString += '&' + this.req.getQueryString();
           }
  +        this.requestURI = this.req.getRequestURI();
       }
   
       public Object get(String name) {
  @@ -267,7 +271,7 @@
       }
   
       public String getRequestURI() {
  -        return this.req.getRequestURI();
  +        return this.requestURI;
       }
   
       public String getSitemapURI() {
  @@ -313,4 +317,12 @@
       public String getAuthType() {
           return this.req.getAuthType();
       }   
  +    
  +    public void setRequestURI(String prefix, String uri) {
  +        StringBuffer buffer = new StringBuffer(this.getContextPath());
  +        buffer.append('/');
  +        buffer.append(prefix);
  +        buffer.append(uri);
  +        this.requestURI = buffer.toString();
  +    }
   }
  
  
  
  1.21      +2 -1      cocoon-2.1/src/java/org/apache/cocoon/components/treeprocessor/TreeProcessor.java
  
  Index: TreeProcessor.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/treeprocessor/TreeProcessor.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- TreeProcessor.java	5 Mar 2004 13:02:51 -0000	1.20
  +++ TreeProcessor.java	11 Mar 2004 14:21:56 -0000	1.21
  @@ -360,6 +360,7 @@
           }
           
           Environment newEnv = new ForwardEnvironmentWrapper(environment, this.manager, uri,
getLogger());
  +        ((ForwardEnvironmentWrapper)newEnv).setExternal(true);
           
           if (facade != null) {
               // Change the facade delegate
  
  
  

Mime
View raw message