commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jeri...@apache.org
Subject cvs commit: jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods GetMethod.java
Date Mon, 29 Apr 2002 16:04:06 GMT
jericho     02/04/29 09:04:06

  Modified:    httpclient/src/java/org/apache/commons/httpclient/methods
                        GetMethod.java
  Log:
  - Set the file name below 256 characters supported by most operating system.
  Because the temporary file including 'temp' directory and timestamp will be over 256 characters...
  like "temp/1019118623166-%2Fattic%2Fsts%..."  It causes a file io exception...
  - Bug reported by "Yu Yizhuan" <yzyu@yahoo.com>
  
  Revision  Changes    Path
  1.10      +5 -5      jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods/GetMethod.java
  
  Index: GetMethod.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods/GetMethod.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- GetMethod.java	22 Feb 2002 19:22:07 -0000	1.9
  +++ GetMethod.java	29 Apr 2002 16:04:05 -0000	1.10
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods/GetMethod.java,v
1.9 2002/02/22 19:22:07 marcsaeg Exp $
  - * $Revision: 1.9 $
  - * $Date: 2002/02/22 19:22:07 $
  + * $Header: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods/GetMethod.java,v
1.10 2002/04/29 16:04:05 jericho Exp $
  + * $Revision: 1.10 $
  + * $Date: 2002/04/29 16:04:05 $
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
  @@ -367,9 +367,9 @@
                   if (tempFile == null) {
                       String encodedPath = URLEncoder.encode(getPath());
                       int length = encodedPath.length();
  -                    if (length > 240) {
  +                    if (length > 200) {
                           encodedPath =
  -                            encodedPath.substring(length - 200, length);
  +                            encodedPath.substring(length - 190, length);
                       }
                       tempFileName = System.currentTimeMillis() + "-"
                           + encodedPath + ".tmp";
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message