You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by je...@apache.org on 2002/04/29 18:04:06 UTC

cvs commit: jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods GetMethod.java

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" <yz...@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:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>