Commit 45535d4f by Tom Tromey Committed by Tom Tromey

Headers.java (parse): Include final character of line.

	* gnu/java/net/protocol/http/Headers.java (parse): Include final
	character of line.

From-SVN: r99794
parent 92f0ebd1
2005-05-16 Tom Tromey <tromey@redhat.com> 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: PR libgcj/21606:
* java/net/URI.java (unquote): Handle lower-case letters as well. * java/net/URI.java (unquote): Handle lower-case letters as well.
......
...@@ -323,7 +323,10 @@ public class Headers ...@@ -323,7 +323,10 @@ public class Headers
if (c1 == ' ' || c1 == '\t') if (c1 == ' ' || c1 == '\t')
{ {
// Continuation // 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 else
{ {
...@@ -340,7 +343,10 @@ public class Headers ...@@ -340,7 +343,10 @@ public class Headers
di++; di++;
} }
while (di < len && line.charAt(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));
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment