- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for TransferEncoding (0.26 sec)
-
cmd/http-tracer.go
} // Calculate input body size with headers reqHeaders := r.Header.Clone() reqHeaders.Set("Host", r.Host) if len(r.TransferEncoding) == 0 { reqHeaders.Set("Content-Length", strconv.Itoa(int(r.ContentLength))) } else { reqHeaders.Set("Transfer-Encoding", strings.Join(r.TransferEncoding, ",")) } inputBytes := reqRecorder.Size() for k, v := range reqHeaders { inputBytes += len(k) + len(v) }
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Mon Jun 03 15:45:54 UTC 2024 - 6K bytes - Viewed (0) -
src/net/http/request_test.go
req.TransferEncoding[0] = "encoding2" if req.TransferEncoding[0] != "encoding2" { t.Error("expected req.TransferEncoding to be changed") } if clonedReq.TransferEncoding[0] != "encoding1" { t.Error("expected clonedReq.TransferEncoding to be unchanged") } } // Ensure that Request.Clone works correctly with PathValue. // See issue 64911. func TestRequestClonePathValue(t *testing.T) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 16 18:42:34 UTC 2024 - 44K bytes - Viewed (0) -
src/net/http/clientserver_test.go
t.Errorf("expected ContentLength of %d; got %d", e, g) } wantTE := []string{"chunked"} if mode == http2Mode { wantTE = nil } if !reflect.DeepEqual(res.TransferEncoding, wantTE) { t.Errorf("TransferEncoding = %v; want %v", res.TransferEncoding, wantTE) } if got, haveCL := res.Header["Content-Length"]; haveCL { t.Errorf("Unexpected Content-Length: %q", got) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 46.6K bytes - Viewed (0) -
src/net/http/request.go
// also treated as unknown. ContentLength int64 // TransferEncoding lists the transfer encodings from outermost to // innermost. An empty list denotes the "identity" encoding. // TransferEncoding can usually be ignored; chunked encoding is // automatically added and removed as necessary when sending and // receiving requests. TransferEncoding []string // Close indicates whether to close the connection after
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 17:58:53 UTC 2024 - 49.4K bytes - Viewed (0) -
cmd/signature-v4-utils.go
extractedSignedHeaders.Set(header, r.Host) case "transfer-encoding": // Go http server removes "host" from Request.Header extractedSignedHeaders[http.CanonicalHeaderKey(header)] = r.TransferEncoding case "content-length": // Signature-V4 spec excludes Content-Length from signed headers list for signature calculation. // But some clients deviate from this rule. Hence we consider Content-Length for signature
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Thu Jun 13 22:26:38 UTC 2024 - 9.1K bytes - Viewed (0) -
src/net/http/httputil/reverseproxy_test.go
if r.Method == "GET" && r.FormValue("mode") == "hangup" { c, _, _ := w.(http.Hijacker).Hijack() c.Close() return } if len(r.TransferEncoding) > 0 { t.Errorf("backend got unexpected TransferEncoding: %v", r.TransferEncoding) } if r.Header.Get("X-Forwarded-For") == "" { t.Errorf("didn't get X-Forwarded-For header") } if c := r.Header.Get("Connection"); c != "" {
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/serve_test.go
t.Errorf("for %s expected Content-Length header of %q; got %q", url, expected, cl) } if tl, expected := len(res.TransferEncoding), 0; tl != expected { t.Errorf("for %s expected len(res.TransferEncoding) of %d; got %d (%v)", url, expected, tl, res.TransferEncoding) } res.Body.Close() } // Verify that ErrContentLength is returned url := ts.URL + "/?overwrite=1"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jun 07 17:57:01 UTC 2024 - 202K bytes - Viewed (0) -
src/net/http/server.go
// This type is used to avoid extra allocations from cloning and/or populating // the response Header map and all its 1-element slices. type extraHeader struct { contentType string connection string transferEncoding string date []byte // written if not nil contentLength []byte // written if not nil } // Sorted the same as extraHeader.Write's loop. var extraHeaderKeys = [][]byte{
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jun 07 17:57:01 UTC 2024 - 123.4K bytes - Viewed (0) -
cmd/object-handlers_test.go
addCustomHeaders(req, testCase.headers) // Inject faults if specified in testCase.fault switch testCase.fault { case MissingContentLength: req.ContentLength = -1 req.TransferEncoding = []string{} case TooBigObject: req.ContentLength = globalMaxObjectSize + 1 } // Since `apiRouter` satisfies `http.Handler` it has a ServeHTTP to execute the logic of the handler.
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Mon Jun 10 15:50:49 UTC 2024 - 161.9K bytes - Viewed (0)