diff --git a/Lib/http/cookiejar.py b/Lib/http/cookiejar.py index 93b10d26c84545..0176cdb1598153 100644 --- a/Lib/http/cookiejar.py +++ b/Lib/http/cookiejar.py @@ -53,7 +53,8 @@ def _debug(*args): HTTPONLY_ATTR = "HTTPOnly" HTTPONLY_PREFIX = "#HttpOnly_" DEFAULT_HTTP_PORT = str(http.client.HTTP_PORT) -NETSCAPE_MAGIC_RGX = re.compile("#( Netscape)? HTTP Cookie File") +NETSCAPE_MAGIC_RGX = re.compile("#( Netscape)? HTTP Cookie File", + re.IGNORECASE) MISSING_FILENAME_TEXT = ("a filename was not supplied (nor was the CookieJar " "instance initialised with one)") NETSCAPE_HEADER_TEXT = """\ diff --git a/Misc/ACKS b/Misc/ACKS index 49f3692dfd6b8f..cd7c7c03462f6f 100644 --- a/Misc/ACKS +++ b/Misc/ACKS @@ -709,6 +709,7 @@ Brian Harring Jonathan Hartley Travis B. Hartwell Henrik Harutyunyan +Ashley Harvey Shane Harvey Larry Hastings Tim Hatch diff --git a/Misc/NEWS.d/next/Library/2023-02-11-09-49-49.gh-issue-82039.caTE7O.rst b/Misc/NEWS.d/next/Library/2023-02-11-09-49-49.gh-issue-82039.caTE7O.rst new file mode 100644 index 00000000000000..cb75ae83780eaf --- /dev/null +++ b/Misc/NEWS.d/next/Library/2023-02-11-09-49-49.gh-issue-82039.caTE7O.rst @@ -0,0 +1,2 @@ +:meth:`http.cookiejar.FileCookieJar.load` now checks the first, format +signature line in a case-insensitive manner. Patch by Ashley Harvey.