Opened 12 years ago
Last modified 12 years ago
#18796 closed Cleanup/optimization
Refactor HttpResponse.__iter__ / _get_content — at Initial Version
Reported by: | Aymeric Augustin | Owned by: | nobody |
---|---|---|---|
Component: | HTTP handling | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The current implementation isn't DRY. It seems to me that _get_content
should just return b''.join(self)
.
Unfortunately, implementing this naively results in test failures.
This code is sensitive, tricky, and lacks comment. A refactoring would be useful.
See also #4969, #16494, #18764, [5f2d9cdbb1], [2892cb0ec4], and [536b030363].
Note:
See TracTickets
for help on using tickets.