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

Fix TypeError in LintMiddleware #1116

Merged
merged 3 commits into from May 5, 2017
Merged

Conversation

@RonRothman
Copy link
Contributor

@RonRothman RonRothman commented May 5, 2017

This PR fixes a TypeError in werkzueg.contrib.lint.GuardedIterator.close, triggered by a response that, contrary to what the linter expects, has a non-zero content-length.

                if content_length != 0:
                    warn(HTTPWarning('%r responses must have an empty '
>                                    'content length') % status_code)
E                   TypeError: unsupported operand type(s) for %: 'HTTPWarning' and 'int'
CHANGES Outdated
@@ -20,6 +20,7 @@ yet to be released
4093 bytes. Browsers may silently ignore cookies larger than this.
``BaseResponse`` has a new attribute ``max_cookie_size`` and ``dump_cookie``
has a new argument ``max_size`` to configure this. (`#780`_, `#1109`_)
- Fix a TypeError in ``werkzueg.contrib.lint.GuardedIterator.close``.
Copy link
Member

@untitaker untitaker May 5, 2017

Please fix this typo: werkzueg/werkzeug

Copy link
Contributor Author

@RonRothman RonRothman May 5, 2017

Whoops--fixed. Thanks.

@untitaker untitaker self-assigned this May 5, 2017
@untitaker untitaker merged commit 8cd1360 into pallets:master May 5, 2017
@untitaker
Copy link
Member

@untitaker untitaker commented May 5, 2017

Thanks!

@davidism davidism added this to the 0.13 milestone Dec 5, 2017
@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
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants