-
-
Notifications
You must be signed in to change notification settings - Fork 32k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refs #33697 -- Used django.utils.http.parse_header_parameters() for parsing boundary streams. #15797
Refs #33697 -- Used django.utils.http.parse_header_parameters() for parsing boundary streams. #15797
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mehrdadmoradii Thanks 👍
@felixxm Currently, there is no more usage for multipartparser.parse_header. I believe it is safe to get rid of that function. Shall I try to do so? |
Please do 👍 |
All done!! Thanks a lot for your supervision. |
…arsing boundary streams. This also removes unused parse_header() and _parse_header_params() helpers in django.http.multipartparser.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mehrdadmoradii Thanks 👍
tests/utils_tests/test_http.py
Outdated
def test_parse_header_with_double_quotes_and_semicolon(self): | ||
self.assertEqual( | ||
parse_header_parameters('form-data; name="files"; filename="fo\\"o;bar"'), | ||
("form-data", {"name": "files", "filename": 'fo"o;bar'}), | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is already covered by ParseHeaderParameterTests.test_basic()
.
0df41d7
to
d4d5427
Compare
I'm not sure if this is Django's problem, per se, but I wanted to note that django-rest-framework relies on the removed |
@Scotchester Thanks for letting us know 👍 This is a private API, but we can add a release note, see #15804. |
- there are sometimes breaking changes introducted in django's main branch, that other dependencies take time to handle. For example: our CI has been broken for almost a month now, due to the breaking change in django/django#15797. Hence, ignoring the results of the django main branch for now, to allow all other patches to be merged.
- there are sometimes breaking changes introducted in django's main branch, that other dependencies take time to handle. For example: our CI has been broken for almost a month now, due to the breaking change in django/django#15797. Hence, ignoring the results of the django main branch for now, to allow all other patches to be merged.
@felixxm Made parse_boundary_stream in django.http.multipartparser use django.utils.http.parse_header_parameters(). Also, changing django.utils.http.parse_header_parameters in order to return the key in lowercase; also, dealing with language Lang/encoding embedded in the value.