8000 [3.7] bpo-34226: fix cgi.parse_multipart without content_length (GH-8530) by miss-islington · Pull Request #20892 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

[3.7] bpo-34226: fix cgi.parse_multipart without content_length (GH-8530) #20892

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

Merged
merged 1 commit into from
Jun 15, 2020

Conversation

miss-islington
Copy link
Contributor
@miss-islington miss-islington commented Jun 15, 2020

In Python 3.7 the behavior of parse_multipart changed requiring CONTENT-LENGTH
header, this fix remove this header as required and fix FieldStorage
read_lines_to_outerboundary, by not using limit when it's negative,
since by default it's -1 if not content-length and keeps substracting what
was read from the file object.

Also added a test case for this problem.
(cherry picked from commit d8cf351)

Co-authored-by: roger rogerduran@gmail.com

https://bugs.python.org/issue34226

Automerge-Triggered-By: @ned-deily

)

In Python 3.7 the behavior of parse_multipart changed requiring CONTENT-LENGTH
header, this fix remove this header as required and fix FieldStorage
read_lines_to_outerboundary, by not using limit when it's negative,
since by default it's -1 if not content-length and keeps substracting what
was read from the file object.

Also added a test case for this problem.
(cherry picked from commit d8cf351)

Co-authored-by: roger <rogerduran@gmail.com>
@miss-islington
Copy link
Contributor Author

@Roger: Status check is done, and it's a success ✅ .

@miss-islington miss-islington merged commit aa83935 into python:3.7 Jun 15, 2020
@miss-islington miss-islington deleted the backport-d8cf351-3.7 branch June 15, 2020 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sprint type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0