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

Commit 65c0fc4f authored by Grace Kloba's avatar Grace Kloba
Browse files

Fix #1876303. Even rfc2616 4.2 says that "Field names are case-insensitive.",...

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.
parent bd9aa793
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);
        }
    }
}