Skip to content

Commit 9d37429

Browse files
committed
Revert "pythongh-128982: Substitute regular expression in http.cookiejar.join_header_words for an efficient alternative (pythonGH-128983)"
This reverts commit 56e1900.
1 parent 56e1900 commit 9d37429

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

Lib/http/cookiejar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ def join_header_words(lists):
448448
attr = []
449449
for k, v in pairs:
450450
if v is not None:
451-
if not v.isalnum() and '_' not in v:
451+
if not re.search(r"^\w+$", v):
452452
v = HEADER_JOIN_ESCAPE_RE.sub(r"\\\1", v) # escape " and \
453453
v = '"%s"' % v
454454
k = "%s=%s" % (k, v)

Misc/NEWS.d/next/Library/2025-01-18-11-40-11.gh-issue-128982.557lS5.rst

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)