Closed arteymix closed 8 years ago
@@ master #186 diff @@
==========================================
Files 31 31
Lines 988 1011 +23
Methods 0 0
Messages 0 0
Branches 116 114 -2
==========================================
+ Hits 648 656 +8
- Misses 303 318 +15
Partials 37 37
Powered by Codecov. Last updated by 0191801...e50674f
Some protocols like 'HTTP/2.0' use different channels for sending headers and body resulting in the possibility of having parts of the body emitted while not all headers are sent. This is while splitting
Response.write_head
is very convenient.Automatically calling a writer should be implementation-specific, so we don't write headers when the body is first accessed.
Response.head_written
is replaced by a flag covering the following conditions:It's not possible to reliably know when the body has been written.
It's handy to have a final status line but not yet headers, especially if one wants to generate headers based on a specific status.
There's some tests to fix and probably add cover new edge cases.