#35440: Update parse_header_parameters to leverage the parsing logic from
(stdlib)
email Message.
-------------------------------------+-------------------------------------
Reporter: Natalia Bidart | Owner: Khudyakov
Type: | Artem
Cleanup/optimization | Status: closed
Component: HTTP handling | Version: dev
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by nessita <124304+nessita@…>):
* resolution: => fixed
* status: assigned => closed
Comment:
In [changeset:"9aabe7eae3eeb3e64c5a0f3687118cd806158550" 9aabe7e]:
{{{#!CommitTicketReference repository=""
revision="9aabe7eae3eeb3e64c5a0f3687118cd806158550"
Fixed #35440 -- Simplified parse_header_parameters by leveraging stdlid's
Message.
The `parse_header_parameters` function historically used Python's `cgi`
module (now deprecated). In 34e2148fc725e7200050f74130d7523e3cd8507a,
the logic was inlined to work around this deprecation ( #33173). Later,
in d4d5427571b4bf3a21c902276c2a00215c2a37cc, the header parsing logic
was further cleaned up to align with `multipartparser.py` (#33697).
This change takes it a step further by replacing the copied `cgi` logic
with
Python's `email.message.Message` API for a more robust and maintainable
header
parsing implementation.
Thanks to Raphael Gaschignard for testing, and to Adam Johnson and Shai
Berger for reviews.
Co-authored-by: Ben Cail <[email protected]>
Co-authored-by: Natalia <[email protected]>
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/35440#comment:13>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/django-updates/01070195d7769661-64518289-c5d7-47a7-8d7d-c346b4f64573-000000%40eu-central-1.amazonses.com.