#1569 closed enhancement (fixed)
[patch] Streaming HttpResponse
| Reported by: | Owned by: | Adrian Holovaty | |
|---|---|---|---|
| Component: | Core (Other) | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | Maniac@… | Triage Stage: | Unreviewed |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
HttpResponse should be able to accept not only strings but any iterator. This is most useful for streaming files without loading them into memory.
Patches follow.
Attachments (6)
Change History (15)
by , 20 years ago
| Attachment: | 1569.trunk.diff added |
|---|
comment:1 by , 20 years ago
| Cc: | added |
|---|---|
| Summary: | Streaming HttpResponse → [patch] Streaming HttpResponse |
comment:2 by , 20 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
comment:3 by , 20 years ago
Unicode is not getting encoded anymore - the content property does the encoding but this is bypassed by accessing the iterator in the handlers.
comment:4 by , 20 years ago
| Resolution: | fixed |
|---|---|
| Status: | closed → reopened |
Good point, Kieran. I'm reopening.
comment:5 by , 20 years ago
Oops, sorry. I missed this when refactoring 2nd version of the patch.
New patch turns public iterator that is given to a handler into a generator converting unicode to default_charset if necessary.
Kieran, thanks for quick catch!
comment:6 by , 20 years ago
| Resolution: | → fixed |
|---|---|
| Status: | reopened → closed |
comment:7 by , 20 years ago
Thanks Adrian!
How about the second half of this thing in #1484 ? I've updated those patches for the current code.
Patch for trunk