diff options
author | Tom Tromey <tromey@redhat.com> | 2005-05-16 21:00:49 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2005-05-16 21:00:49 +0000 |
commit | 45535d4f3e3cfb83fbb32619668736b5e30e6aa0 (patch) | |
tree | 86b76717ae2b880c2dc323237987a8b2b4f8353c | |
parent | 92f0ebd126315ef51170df23efe38c251a7f6f2f (diff) | |
download | gcc-45535d4f3e3cfb83fbb32619668736b5e30e6aa0.zip gcc-45535d4f3e3cfb83fbb32619668736b5e30e6aa0.tar.gz gcc-45535d4f3e3cfb83fbb32619668736b5e30e6aa0.tar.bz2 |
Headers.java (parse): Include final character of line.
* gnu/java/net/protocol/http/Headers.java (parse): Include final
character of line.
From-SVN: r99794
-rw-r--r-- | libjava/ChangeLog | 5 | ||||
-rw-r--r-- | libjava/gnu/java/net/protocol/http/Headers.java | 10 |
2 files changed, 13 insertions, 2 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 94cdae9..c629509 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,5 +1,10 @@ 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: * java/net/URI.java (unquote): Handle lower-case letters as well. diff --git a/libjava/gnu/java/net/protocol/http/Headers.java b/libjava/gnu/java/net/protocol/http/Headers.java index 0db9a55..9968b2e 100644 --- a/libjava/gnu/java/net/protocol/http/Headers.java +++ b/libjava/gnu/java/net/protocol/http/Headers.java @@ -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)); } } } |