@@ -1137,6 +1137,33 @@ def test_parse_cookie_header_empty() -> None:
11371137 assert parse_cookie_header (" " ) == []
11381138
11391139
1140+ @pytest .mark .xfail (reason = "https://github.com/aio-libs/aiohttp/issues/11632" )
1141+ def test_parse_cookie_gstate_header () -> None :
1142+ header = (
1143+ "_ga=ga; "
1144+ "ajs_anonymous_id=0anonymous; "
1145+ "analytics_session_id=session; "
1146+ "cookies-analytics=true; "
1147+ "cookies-functional=true; "
1148+ "cookies-marketing=true; "
1149+ "cookies-preferences=true; "
1150+ 'g_state={"i_l":0,"i_ll":12345,"i_b":"blah"}; '
1151+ "analytics_session_id.last_access=1760128947692; "
1152+ "landingPageURLRaw=landingPageURLRaw; "
1153+ "landingPageURL=landingPageURL; "
1154+ "referrerPageURLRaw=; "
1155+ "referrerPageURL=; "
1156+ "formURLRaw=formURLRaw; "
1157+ "formURL=formURL; "
1158+ "fbnAuthExpressCheckout=fbnAuthExpressCheckout; "
1159+ "is_express_checkout=1; "
1160+ )
1161+
1162+ result = parse_cookie_header (header )
1163+ assert result [7 ][0 ] == "g_state"
1164+ assert result [8 ][0 ] == "analytics_session_id.last_access"
1165+
1166+
11401167def test_parse_cookie_header_quoted_values () -> None :
11411168 """Test parse_cookie_header handles quoted values correctly."""
11421169 header = 'name="quoted value"; session="with;semicolon"; data="with\\ "escaped\\ ""'
0 commit comments