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.0/src/java/org/apache/cocoon/environment/http HttpEnvironment.java
Date Wed, 07 May 2003 20:43:14 GMT
cziegeler    2003/05/07 13:43:13

  Modified:    .        changes.xml
               src/java/org/apache/cocoon/environment/http
                        HttpEnvironment.java
  Log:
  Fixing bug 17612 and 19683
  
  Revision  Changes    Path
  1.8       +7 -1      cocoon-2.0/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /home/cvs/cocoon-2.0/changes.xml,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- changes.xml	6 May 2003 09:20:05 -0000	1.7
  +++ changes.xml	7 May 2003 20:43:13 -0000	1.8
  @@ -42,6 +42,12 @@
    </devs>
   
    <release version="@version@" date="@date@">
  +  <action dev="CZ" type="fix" fixes-bug="14117">
  +   Obtain handler and application name from paramters for internal requests if handler
could not be resolved from the request object .
  +  </action>
  +  <action dev="CZ" type="fix" fixes-bug="17612">
  +   Delaying getting of the output stream from the http response until it is really needed.
  +  </action>
     <action dev="CZ" type="fix" fixes-bug="19683">
      Fixing the problem with eating spaces in custom transformers.
     </action>
  
  
  
  1.2       +9 -7      cocoon-2.0/src/java/org/apache/cocoon/environment/http/HttpEnvironment.java
  
  Index: HttpEnvironment.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.0/src/java/org/apache/cocoon/environment/http/HttpEnvironment.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- HttpEnvironment.java	9 Mar 2003 00:02:56 -0000	1.1
  +++ HttpEnvironment.java	7 May 2003 20:43:13 -0000	1.2
  @@ -78,19 +78,19 @@
       public static final String HTTP_SERVLET_CONTEXT= "httpservletcontext";
   
       /** The HttpRequest */
  -    private HttpRequest request = null;
  +    private HttpRequest request;
   
       /** The HttpResponse */
  -    private HttpResponse response = null;
  +    private HttpResponse response;
   
       /** The HttpContext */
  -    private HttpContext webcontext = null;
  +    private HttpContext webcontext;
   
       /** The OutputStream */
  -    private OutputStream outputStream = null;
  +    private OutputStream outputStream;
   
       /** Cache content type as there is no getContentType() in reponse object */
  -    private String contentType = null;
  +    private String contentType;
       
       /** Did we redirect ? */
       private boolean hasRedirected = false;
  @@ -116,7 +116,6 @@
           this.request.setContainerEncoding(containerEncoding);
           this.response = new HttpResponse(res);
           this.webcontext = context;
  -        this.outputStream = response.getOutputStream();
           this.objectModel.put(ObjectModelHelper.REQUEST_OBJECT, this.request);
           this.objectModel.put(ObjectModelHelper.RESPONSE_OBJECT, this.response);
           this.objectModel.put(ObjectModelHelper.CONTEXT_OBJECT, this.webcontext);
  @@ -237,6 +236,9 @@
        * Get the OutputStream
        */
       public OutputStream getOutputStream() throws IOException {
  +        if ( this.outputStream == null) {
  +            this.outputStream = this.response.getOutputStream();
  +        }
           return this.outputStream;
       }
   
  
  
  

Mime
View raw message