Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7a573862 authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

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.
parents 083928fe 65c0fc4f
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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")) {
+1 −1
Original line number Diff line number Diff line
@@ -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);
        }
    }
}