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 3 commits into from May 5, 2017


None yet
3 participants
Copy link

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``.

This comment has been minimized.

Copy link

untitaker May 5, 2017


Please fix this typo: werkzueg/werkzeug

This comment has been minimized.

Copy link

RonRothman May 5, 2017

Author Contributor

Whoops--fixed. Thanks.

@untitaker untitaker self-assigned this May 5, 2017

RonRothman and others added some commits May 5, 2017

@untitaker untitaker merged commit 8cd1360 into pallets:master May 5, 2017


This comment has been minimized.

Copy link

commented May 5, 2017


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.