Skip to content
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

Don't set CONTENT_TYPE / CONTENT_LENGTH if they're not provided by the client #1056

Merged
merged 3 commits into from
Jan 10, 2017

Conversation

wong2
Copy link
Contributor

@wong2 wong2 commented Dec 30, 2016

Fix: #1049

according to (PEP333)(https://www.python.org/dev/peps/pep-0333/#environ-variables) it's ok if they're absent

image

@untitaker
Copy link
Contributor

Thanks for this PR, please rebase against 0.11-maintenance, add tests and a changelog entry.

  • Rebase: git rebase -i origin/0.11-maintenance and remove the commits that are not part of your PR (just delete the lines). Then git push -f. Then edit this PR to be against 0.11-maintenance (edit button at the top)

  • Tests: A test in tests/test_serving.py would be nice

  • Changelog: For the next 0.11.x version

@wong2 wong2 changed the base branch from master to 0.11-maintenance December 31, 2016 14:28
@wong2
Copy link
Contributor Author

wong2 commented Dec 31, 2016

@untitaker all set

@untitaker
Copy link
Contributor

Could you additionally verify that the tests fail without the fix applied? Thanks!

@wong2
Copy link
Contributor Author

wong2 commented Dec 31, 2016

@untitaker oh I've made a mistake, the key in environ should be CONTENT_TYPE / CONTENT_LENGTH, not HTTP_CONTENT_TYPE/HTTP_CONTENT_LENGTH.

made a new push

@wong2
Copy link
Contributor Author

wong2 commented Dec 31, 2016

image

the tests did fail without this patch

@wong2
Copy link
Contributor Author

wong2 commented Jan 9, 2017

ping @untitaker

@untitaker untitaker merged commit bb83b77 into pallets:0.11-maintenance Jan 10, 2017
@untitaker untitaker removed the waiting label Jan 10, 2017
@untitaker
Copy link
Contributor

Thanks!

o11c added a commit to o11c/python-curl-requests that referenced this pull request Apr 22, 2017
markstuart added a commit to mediasuitenz/raygun4py that referenced this pull request Apr 7, 2020
Earlier versions of Werkzerg created a default of ''
for the CONTENT_LENGTH environ var if the client
did not provide the header.

See pallets/werkzeug#1056
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants