cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@apache.org
Subject cvs commit: xml-cocoon2/src/java/org/apache/cocoon/components/request/multipart MultipartParser.java
Date Sun, 19 May 2002 23:13:59 GMT
stefano     02/05/19 16:13:59

  Modified:    src/java/org/apache/cocoon/components/request/multipart
                        MultipartParser.java
  Log:
  copying changes to the HEAD
  
  Revision  Changes    Path
  1.2       +6 -2      xml-cocoon2/src/java/org/apache/cocoon/components/request/multipart/MultipartParser.java
  
  Index: MultipartParser.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/request/multipart/MultipartParser.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- MultipartParser.java	27 Feb 2002 20:21:22 -0000	1.1
  +++ MultipartParser.java	19 May 2002 23:13:59 -0000	1.2
  @@ -72,7 +72,7 @@
    * FilePart: file part
    *
    * @author <a href="mailto:j.tervoorde@home.nl">Jeroen ter Voorde</a>
  - * @version CVS $Id: MultipartParser.java,v 1.1 2002/02/27 20:21:22 dims Exp $
  + * @version CVS $Id: MultipartParser.java,v 1.2 2002/05/19 23:13:59 stefano Exp $
    */
   public class MultipartParser extends Hashtable {
   
  @@ -100,6 +100,8 @@
       /** Field maxUploadSize           */
       private int maxUploadSize;
   
  +    /** Field characterEncoding       */
  +    private String characterEncoding;
       /**
        * Constructor, parses given request
        *
  @@ -125,6 +127,8 @@
           this.allowOverwrite = allowOverwrite;
           this.silentlyRename = silentlyRename;
           this.maxUploadSize = maxUploadSize;
  +        this.characterEncoding = request.getCharacterEncoding();
  +        if (this.characterEncoding == null) this.characterEncoding = "ISO-8859-1";
   
           if (request.getContentLength() > maxUploadSize) {
               throw new IOException("Content length exceeds maximum upload size");
  @@ -283,7 +287,7 @@
           while (in.getState() == TokenStream.STATE_READING) {
               int read = in.read(buf);
   
  -            value.append(new String(buf, 0, read));
  +            value.append(new String(buf, 0, read, this.characterEncoding));
           }
   
           String field = (String) headers.get("name");
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message