Add "Partitioned" flag to our cookies (#3830)

This commit is contained in:
Raphael Michel
2024-01-25 09:46:04 +01:00
committed by GitHub
parent 6af2d38a98
commit 645c9d5900
2 changed files with 10 additions and 0 deletions

View File

@@ -21,6 +21,7 @@
#
import types
from datetime import datetime
from http import cookies
from PIL import Image
from requests.adapters import HTTPAdapter
@@ -88,7 +89,14 @@ def monkeypatch_requests_timeout():
HTTPAdapter.send = httpadapter_send
def monkeypatch_cookie_morsel():
# See https://code.djangoproject.com/ticket/34613
cookies.Morsel._flags.add("partitioned")
cookies.Morsel._reserved.setdefault("partitioned", "Partitioned")
def monkeypatch_all_at_ready():
monkeypatch_vobject_performance()
monkeypatch_pillow_safer()
monkeypatch_requests_timeout()
monkeypatch_cookie_morsel()