- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for TrailerPrefix (0.49 sec)
-
src/net/http/httptest/recorder.go
res.Trailer[k] = vv2 } } } for k, vv := range rw.HeaderMap { if !strings.HasPrefix(k, http.TrailerPrefix) { continue } if res.Trailer == nil { res.Trailer = make(http.Header) } for _, v := range vv { res.Trailer.Add(strings.TrimPrefix(k, http.TrailerPrefix), v) } } return res } // parseContentLength trims whitespace from s and returns -1 if no value
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 10 03:29:50 UTC 2024 - 7K bytes - Viewed (0) -
src/net/http/server.go
// https://pkg.go.dev/net/http#example-ResponseWriter-Trailers const TrailerPrefix = "Trailer:" // finalTrailers is called after the Handler exits and returns a non-nil // value if the Handler set any trailers. func (w *response) finalTrailers() Header { var t Header for k, vv := range w.handlerHeader { if kk, found := strings.CutPrefix(k, TrailerPrefix); found { if t == nil { t = make(Header) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jun 07 17:57:01 UTC 2024 - 123.4K bytes - Viewed (0) -
src/net/http/httputil/reverseproxy_test.go
http.SetCookie(w, &http.Cookie{Name: "flavor", Value: "chocolateChip"}) w.WriteHeader(backendStatus) w.Write([]byte(backendResponse)) w.Header().Set("X-Trailer", "trailer_value") w.Header().Set(http.TrailerPrefix+"X-Unannounced-Trailer", "unannounced_trailer_value") })) defer backend.Close() backendURL, err := url.Parse(backend.URL) if err != nil { t.Fatal(err) } proxyHandler := NewSingleHostReverseProxy(backendURL)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 54.6K bytes - Viewed (0) -
src/net/http/httputil/reverseproxy.go
http.NewResponseController(rw).Flush() } if len(res.Trailer) == announcedTrailers { copyHeader(rw.Header(), res.Trailer) return } for k, vv := range res.Trailer { k = http.TrailerPrefix + k for _, v := range vv { rw.Header().Add(k, v) } } } var inOurTests bool // whether we're in our own tests // shouldPanicOnCopyError reports whether the reverse proxy should
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Feb 27 23:37:42 UTC 2024 - 24.9K bytes - Viewed (0) -
src/net/http/h2_bundle.go
streamID: rws.stream.id, h: rws.handlerHeader, trailers: rws.trailers, endStream: true, }) return len(p), err } return len(p), nil } // TrailerPrefix is a magic prefix for ResponseWriter.Header map keys // that, if present, signals that the map entry is actually for // the response trailers, and not the response headers. The prefix
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 04 16:19:04 UTC 2024 - 364.1K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go
{"StatusUpgradeRequired", Const, 7}, {"StatusUseProxy", Const, 0}, {"StatusVariantAlsoNegotiates", Const, 7}, {"StripPrefix", Func, 0}, {"TimeFormat", Const, 0}, {"TimeoutHandler", Func, 0}, {"TrailerPrefix", Const, 8}, {"Transport", Type, 0}, {"Transport.Dial", Field, 0}, {"Transport.DialContext", Field, 7}, {"Transport.DialTLS", Field, 4}, {"Transport.DialTLSContext", Field, 14},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 534.2K bytes - Viewed (0)