summaryrefslogtreecommitdiffstats
path: root/support
diff options
context:
space:
mode:
authorJesse Wilson <jessewilson@google.com>2010-01-07 13:41:30 -0800
committerJesse Wilson <jessewilson@google.com>2010-01-08 13:40:36 -0800
commit398cf32a303a3b2a878a48cbae54be5ac23f7ecd (patch)
tree27a01a52e904b86402d6f174d598df0ff3d57b54 /support
parent10ed9a64b3c3036a0d3d8a35693c8f8b03469512 (diff)
downloadlibcore-398cf32a303a3b2a878a48cbae54be5ac23f7ecd.zip
libcore-398cf32a303a3b2a878a48cbae54be5ac23f7ecd.tar.gz
libcore-398cf32a303a3b2a878a48cbae54be5ac23f7ecd.tar.bz2
Fixing our default HTTP Accept header to be spec-compliant.
See bug http://code.google.com/p/android/issues/detail?id=5843 Also fixing a bug in the test webserver, where we weren't formatting the headers properly. I'm dumbfounded how the tests passed previously; although I fear that omitting the @TestTargetNew annotation might mean that they weren't being run. I'll investigate that in a follow up.
Diffstat (limited to 'support')
-rw-r--r--support/src/test/java/tests/support/Support_TestWebServer.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/support/src/test/java/tests/support/Support_TestWebServer.java b/support/src/test/java/tests/support/Support_TestWebServer.java
index b7e8b38..7d20237 100644
--- a/support/src/test/java/tests/support/Support_TestWebServer.java
+++ b/support/src/test/java/tests/support/Support_TestWebServer.java
@@ -561,7 +561,7 @@ public class Support_TestWebServer implements Support_HttpConstants {
while (buf[i] == ' ') {
i++;
}
- String headerValue = new String(buf, i, nread-i);
+ String headerValue = new String(buf, i, nread - i - 2); // drop \r\n
headers.put(headerName, headerValue);
return nread;