cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ba...@locus.apache.org
Subject cvs commit: xml-cocoon/src/org/apache/cocoon Engine.java
Date Thu, 07 Dec 2000 00:07:28 GMT
balld       00/12/06 16:07:27

  Modified:    src/org/apache/cocoon Engine.java
  Log:
  fixed encoding with setContentLength
  
  Revision  Changes    Path
  1.42      +7 -3      xml-cocoon/src/org/apache/cocoon/Engine.java
  
  Index: Engine.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/Engine.java,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- Engine.java	2000/12/07 00:05:20	1.41
  +++ Engine.java	2000/12/07 00:07:26	1.42
  @@ -1,4 +1,4 @@
  -/*-- $Id: Engine.java,v 1.41 2000/12/07 00:05:20 balld Exp $ --
  +/*-- $Id: Engine.java,v 1.42 2000/12/07 00:07:26 balld Exp $ --
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -77,7 +77,7 @@
    *
    * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
    * @author <a href="mailto:greenrd@hotmail.com">Robin Green</a>
  - * @version $Revision: 1.41 $ $Date: 2000/12/07 00:05:20 $
  + * @version $Revision: 1.42 $ $Date: 2000/12/07 00:07:26 $
    */
   
   public class Engine implements Defaults {
  @@ -440,7 +440,11 @@
                   }
   
                   if (!VERBOSE && page.isText()) {
  -                    response.setContentLength(page.getContent().getBytes().length);
  +                    if (encoding == null) {
  +                        response.setContentLength(page.getContent().getBytes().length);
  +                    } else {
  +                        response.setContentLength(page.getContent().getBytes(encoding).length);
  +                    }
                   }
   
                   // get the output writer
  
  
  

Mime
View raw message