diff options
-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)); } } } |