Home | History | Annotate | Download | only in http

Lines Matching defs:chunked

26 // with malformed chunked encoding.
106 t.TransferEncoding = []string{"chunked"}
128 if chunked(t.TransferEncoding) {
135 if chunked(t.TransferEncoding) {
143 if !chunked(t.TransferEncoding) {
151 // chunked request body to the server. In particular, the case we really
153 // server with a chunked body when the body has zero bytes, since GETs with
154 // bodies (while acceptable according to specs), even zero-byte chunked
183 // can deal with a chunked request body. Maybe we'll adjust this
199 // * there is no transfer-encoding=chunked already set.
234 // "Transfer-Encoding: chunked" header.
248 if chunked(t.TransferEncoding) {
288 } else if chunked(t.TransferEncoding) {
289 if _, err := io.WriteString(w, "Transfer-Encoding: chunked\r\n"); err != nil {
325 if chunked(t.TransferEncoding) {
360 if chunked(t.TransferEncoding) {
483 // If there is no Content-Length or chunked Transfer-Encoding on a *Response
489 !chunked(t.TransferEncoding) &&
496 // Prepare body reader. ContentLength < 0 means chunked encoding
499 case chunked(t.TransferEncoding):
539 // Checks whether chunked is part of the encodings stack
540 func chunked(te []string) bool { return len(te) > 0 && te[0] == "chunked" }
560 // TODO: Even though we only support "identity" and "chunked"
563 // chunked encoding must always come first.
570 if encoding != "chunked" {
651 if chunked(te) {
675 // no body if neither Transfer-Encoding chunked nor a
680 // Body-EOF logic based on other methods (like closing, or chunked coding)
734 if !chunked(te) {
782 // Chunked case. Read the trailer.
867 return errors.New("http: suspiciously long trailer after chunked body")