1
0
mirror of https://github.com/golang/go synced 2024-11-07 13:46:19 -07:00

http/internal: document final CRLF behavior on chunkedWriter

Change-Id: I0f76b40dbfda2d382c88aec377db1851c4ac7441
This commit is contained in:
Eric Daniels 2018-07-16 19:29:25 -04:00
parent 4b0c8b0136
commit ab42559278
No known key found for this signature in database
GPG Key ID: 06E51C5989EE98ED
2 changed files with 6 additions and 2 deletions

View File

@ -23,7 +23,9 @@ func NewChunkedReader(r io.Reader) io.Reader {
// NewChunkedWriter returns a new chunkedWriter that translates writes into HTTP
// "chunked" format before writing them to w. Closing the returned chunkedWriter
// sends the final 0-length chunk that marks the end of the stream.
// sends the final 0-length chunk that marks the end of the stream but does
// not send the final CRLF that appears after trailers; trailers and the last
// CRLF must be written separately.
//
// NewChunkedWriter is not needed by normal applications. The http
// package adds chunking automatically if handlers don't set a

View File

@ -171,7 +171,9 @@ func removeChunkExtension(p []byte) ([]byte, error) {
// NewChunkedWriter returns a new chunkedWriter that translates writes into HTTP
// "chunked" format before writing them to w. Closing the returned chunkedWriter
// sends the final 0-length chunk that marks the end of the stream.
// sends the final 0-length chunk that marks the end of the stream but does
// not send the final CRLF that appears after trailers; trailers and the last
// CRLF must be written separately.
//
// NewChunkedWriter is not needed by normal applications. The http
// package adds chunking automatically if handlers don't set a