Skip to content

Fix TypeError in LintMiddleware#1116

Merged
untitaker merged 3 commits into
pallets:masterfrom
RonRothman:fix-lint-typo
May 5, 2017
Merged

Fix TypeError in LintMiddleware#1116
untitaker merged 3 commits into
pallets:masterfrom
RonRothman:fix-lint-typo

Conversation

@RonRothman
Copy link
Copy Markdown
Contributor

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'

Comment thread CHANGES Outdated
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 was marked as off-topic.

This comment was marked as off-topic.

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

Thanks!

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

3 participants