From 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 7 Apr 2024 13:41:34 -0500 Subject: new repository --- devdocs/go/net%2Fhttp%2Finternal%2Findex.html | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 devdocs/go/net%2Fhttp%2Finternal%2Findex.html (limited to 'devdocs/go/net%2Fhttp%2Finternal%2Findex.html') diff --git a/devdocs/go/net%2Fhttp%2Finternal%2Findex.html b/devdocs/go/net%2Fhttp%2Finternal%2Findex.html new file mode 100644 index 00000000..9903dd5b --- /dev/null +++ b/devdocs/go/net%2Fhttp%2Finternal%2Findex.html @@ -0,0 +1,24 @@ +

Package internal

Overview

Package internal contains HTTP internals shared by net/http and net/http/httputil.

Index

Package files

chunked.go

Variables

var ErrLineTooLong = errors.New("header line too long")

func NewChunkedReader

func NewChunkedReader(r io.Reader) io.Reader

NewChunkedReader returns a new chunkedReader that translates the data read from r out of HTTP "chunked" format before returning it. The chunkedReader returns io.EOF when the final 0-length chunk is read.

+

NewChunkedReader is not needed by normal applications. The http package automatically decodes chunking when reading response bodies.

+

func NewChunkedWriter

func NewChunkedWriter(w io.Writer) io.WriteCloser

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 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 Content-Length header. Using newChunkedWriter inside a handler would result in double chunking or chunking with a Content-Length length, both of which are wrong.

+

type FlushAfterChunkWriter

FlushAfterChunkWriter signals from the caller of NewChunkedWriter that each chunk should be followed by a flush. It is used by the net/http.Transport code to keep the buffering behavior for headers and trailers, but flush out chunks aggressively in the middle for request bodies which may be generated slowly. See Issue 6574.

+
type FlushAfterChunkWriter struct {
+    *bufio.Writer
+}
+

Subdirectories

Name Synopsis
..
+

+ © Google, Inc.
Licensed under the Creative Commons Attribution License 3.0.
+ http://golang.org/pkg/net/http/internal/ +

+
-- cgit v1.2.3