| ... | @@ -803,7 +803,7 @@ pub const BodyWriter = struct { | ... | @@ -803,7 +803,7 @@ pub const BodyWriter = struct { |
| 803 | } | 803 | } |
| 804 | | 804 | |
| 805 | /// When using content-length, asserts that the amount of data sent matches | 805 | /// When using content-length, asserts that the amount of data sent matches |
| 806 | /// the value sent in the header, then flushes. | 806 | /// the value sent in the header, then flushes `http_protocol_output`. |
| 807 | /// | 807 | /// |
| 808 | /// When using transfer-encoding: chunked, writes the end-of-stream message | 808 | /// When using transfer-encoding: chunked, writes the end-of-stream message |
| 809 | /// with empty trailers, then flushes the stream to the system. Asserts any | 809 | /// with empty trailers, then flushes the stream to the system. Asserts any |
| ... | @@ -827,10 +827,13 @@ pub const BodyWriter = struct { | ... | @@ -827,10 +827,13 @@ pub const BodyWriter = struct { |
| 827 | /// | 827 | /// |
| 828 | /// Respects the value of `isEliding` to omit all data after the headers. | 828 | /// Respects the value of `isEliding` to omit all data after the headers. |
| 829 | /// | 829 | /// |
| | 830 | /// Does not flush `http_protocol_output`, but does flush `writer`. |
| | 831 | /// |
| 830 | /// See also: | 832 | /// See also: |
| 831 | /// * `end` | 833 | /// * `end` |
| 832 | /// * `endChunked` | 834 | /// * `endChunked` |
| 833 | pub fn endUnflushed(w: *BodyWriter) Error!void { | 835 | pub fn endUnflushed(w: *BodyWriter) Error!void { |
| | 836 | try w.writer.flush(); |
| 834 | switch (w.state) { | 837 | switch (w.state) { |
| 835 | .end => unreachable, | 838 | .end => unreachable, |
| 836 | .content_length => |len| { | 839 | .content_length => |len| { |