Merge change 5720 into donut

* changes:
  Fix #1876303. Even rfc2616 4.2 says that "Field names are case-insensitive.", servers including Google internal uses case-sensitive checking for "Cookie". So change it.
This commit is contained in:
Android (Google) Code Review
2009-06-30 07:06:50 -07:00
2 changed files with 4 additions and 4 deletions

View File

@@ -159,11 +159,11 @@ public class RequestHandle {
e.printStackTrace();
}
// update the "cookie" header based on the redirected url
mHeaders.remove("cookie");
// update the "Cookie" header based on the redirected url
mHeaders.remove("Cookie");
String cookie = CookieManager.getInstance().getCookie(mUri);
if (cookie != null && cookie.length() > 0) {
mHeaders.put("cookie", cookie);
mHeaders.put("Cookie", cookie);
}
if ((statusCode == 302 || statusCode == 303) && mMethod.equals("POST")) {

View File

@@ -364,7 +364,7 @@ class FrameLoader {
String cookie = CookieManager.getInstance().getCookie(
mListener.getWebAddress());
if (cookie != null && cookie.length() > 0) {
mHeaders.put("cookie", cookie);
mHeaders.put("Cookie", cookie);
}
}
}