Home | History | Annotate | Download | only in http

Lines Matching refs:Trailer

36 // writing the respective header, body and trailer in wire format.
45 Trailer Header
65 t.Trailer = rr.Trailer
102 t.Trailer = rr.Trailer
124 // Sanitize Trailer
126 t.Trailer = nil
183 // Write Trailer header
184 if t.Trailer != nil {
185 keys := make([]string, 0, len(t.Trailer))
186 for k := range t.Trailer {
189 case "Transfer-Encoding", "Trailer", "Content-Length":
190 return &badStringError{"invalid Trailer key", k}
198 if _, err := io.WriteString(w, "Trailer: "+strings.Join(keys, ",")+"\r\n"); err != nil {
247 // Write Trailer header
248 if t.Trailer != nil {
249 if err := t.Trailer.Write(w); err != nil {
253 // Last chunk, empty trailer
271 Trailer Header
359 // Trailer
360 t.Trailer, err = fixTrailer(t.Header, t.TransferEncoding)
409 rr.Trailer = t.Trailer
415 rr.Trailer = t.Trailer
568 // Parse the trailer header
570 raw := header.get("Trailer")
575 header.Del("Trailer")
576 trailer := make(Header)
581 case "Transfer-Encoding", "Trailer", "Content-Length":
582 return nil, &badStringError{"bad trailer key", key}
584 trailer[key] = nil
586 if len(trailer) == 0 {
590 // Trailer and no chunking
593 return trailer, nil
598 // and then reads the trailer if necessary.
601 hdr interface{} // non-nil (Response or Request) value means read trailer
602 r *bufio.Reader // underlying wire-format reader for the trailer
636 // Chunked case. Read the trailer.
640 // Something went wrong in the trailer, we must not allow any
692 var errTrailerEOF = errors.New("http: unexpected EOF reading trailer")
709 // a DoS with an unbounded size Trailer. It's not easy to
715 // This limits the trailer to the underlying buffer size, typically 4kB.
717 return errors.New("http: suspiciously long trailer after chunked body")
729 mergeSetHeader(&rr.Trailer, Header(hdr))
731 mergeSetHeader(&rr.Trailer, Header(hdr))
767 // no trailer and closing the connection next.
779 // the trailer headers after the body, if present.
790 // the trailer headers after the body, if present.