]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* gnu/java/net/protocol/http/Headers.java (parse): Include final
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 16 May 2005 21:00:49 +0000 (21:00 +0000)
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 16 May 2005 21:00:49 +0000 (21:00 +0000)
character of line.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99794 138bc75d-0d04-0410-961f-82ee72b054a4

libjava/ChangeLog
libjava/gnu/java/net/protocol/http/Headers.java

index 94cdae92fef8f086c02cc5ab9b806bdd314db37d..c6295096631013e0b2cbb131fd17acc831d206c3 100644 (file)
@@ -1,3 +1,8 @@
+2005-05-16  Tom Tromey  <tromey@redhat.com>
+
+       * gnu/java/net/protocol/http/Headers.java (parse): Include final
+       character of line.
+
 2005-05-16  Tom Tromey  <tromey@redhat.com>
 
        PR libgcj/21606:
index 0db9a552a0f91f6ed8b484a86d581c4d69be1f15..9968b2e778029ca828598f5a368e280e96c5bd9c 100644 (file)
@@ -323,7 +323,10 @@ public class Headers
         if (c1 == ' ' || c1 == '\t')
           {
             // Continuation
-            value.append(line.substring(0, len - 1));
+           int last = len - 1;
+           if (line.charAt(last) != '\r')
+             ++last;
+            value.append(line.substring(0, last));
           }
         else
           {
@@ -340,7 +343,10 @@ public class Headers
                 di++;
               }
             while (di < len && line.charAt(di) == ' ');
-            value.append(line.substring(di, len - 1));
+           int last = len - 1;
+           if (line.charAt(last) != '\r')
+             ++last;
+            value.append(line.substring(di, last));
           }
       }
   }