#18796: Refactor HttpResponse.__iter__ / _get_content
-------------------------------------+-------------------------------------
Reporter: aaugustin | Owner: aaugustin
Type: | Status: new
Cleanup/optimization | Version: master
Component: HTTP handling | Resolution:
Severity: Normal | Triage Stage:
Keywords: | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Description changed by aaugustin:
Old 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].
New 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].
'''To sum up: this ticket is about cleaning up the conversion of HTTP
response content to bytes.'''
--
--
Ticket URL: <https://code.djangoproject.com/ticket/18796#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.