net/http.Response.ContentLength (field)

34 uses

	net/http (current package)
		client.go#L281: 		if resp.ContentLength > 0 && req.Method != "HEAD" {
		client.go#L282: 			return nil, didTimeout, fmt.Errorf("http: RoundTripper implementation (%T) returned a *Response with content length %d but a nil Body", rt, resp.ContentLength)
		client.go#L698: 			if resp.ContentLength == -1 || resp.ContentLength <= maxBodySlurpSize {
		filetransport.go#L95: 		pr.res.ContentLength = -1
		h2_bundle.go#L8535: 		res.ContentLength = -1
		h2_bundle.go#L8538: 				res.ContentLength = int64(cl)
		h2_bundle.go#L8554: 	cs.bufPipe = http2pipe{b: &http2dataBuffer{expected: res.ContentLength}}
		h2_bundle.go#L8555: 	cs.bytesRemain = res.ContentLength
		h2_bundle.go#L8562: 		res.ContentLength = -1
		response.go#L78: 	ContentLength int64
		response.go#L267: 	if r1.ContentLength == 0 && r1.Body != nil {
		response.go#L279: 			r1.ContentLength = -1
		response.go#L293: 	if r1.ContentLength == -1 && !r1.Close && r1.ProtoAtLeast(1, 1) && !chunked(r1.TransferEncoding) && !r1.Uncompressed {
		response.go#L316: 	if r1.ContentLength == 0 && !chunked(r1.TransferEncoding) && !contentLengthAlreadySent && bodyAllowedForStatus(r.StatusCode) {
		transfer.go#L115: 		t.ContentLength = rr.ContentLength
		transfer.go#L588: 		rr.ContentLength = t.ContentLength
		transport.go#L2123: 		hasBody := rc.req.Method != "HEAD" && resp.ContentLength != 0
		transport.go#L2190: 			resp.ContentLength = -1

	net/http/httptest
		recorder.go#L186: 	res.ContentLength = parseContentLength(res.Header.Get("Content-Length"))

	net/http/httputil
		dump.go#L312: 	savecl := resp.ContentLength
		dump.go#L317: 		if resp.ContentLength == 0 {
		dump.go#L335: 	resp.ContentLength = savecl
		reverseproxy.go#L410: 	if res.ContentLength == -1 {

	cloud.google.com/go/storage
		reader.go#L232: 		size = res.ContentLength
		reader.go#L247: 	remain := res.ContentLength

	go.opencensus.io/plugin/ochttp
		client_stats.go#L65: 			track.respContentLength = resp.ContentLength

	golang.org/x/net/http2
		transport.go#L2032: 		res.ContentLength = -1
		transport.go#L2035: 				res.ContentLength = int64(cl)
		transport.go#L2051: 	cs.bufPipe = pipe{b: &dataBuffer{expected: res.ContentLength}}
		transport.go#L2052: 	cs.bytesRemain = res.ContentLength
		transport.go#L2059: 		res.ContentLength = -1

	golang.org/x/pkgsite/internal/proxy
		client.go#L171: 	if res.ContentLength < 0 {
		client.go#L174: 	return res.ContentLength, nil