net/http.Response.ContentLength (field)

21 uses

	net/http (current package)
		client.go#L290: 		if resp.ContentLength > 0 && req.Method != "HEAD" {
		client.go#L291: 			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#L705: 			if resp.ContentLength == -1 || resp.ContentLength <= maxBodySlurpSize {
		filetransport.go#L95: 		pr.res.ContentLength = -1
		h2_bundle.go#L9538: 	res.ContentLength = -1
		h2_bundle.go#L9541: 			res.ContentLength = int64(cl)
		h2_bundle.go#L9550: 		res.ContentLength = 0
		h2_bundle.go#L9559: 		if res.ContentLength > 0 {
		h2_bundle.go#L9567: 	cs.bufPipe.setBuffer(&http2dataBuffer{expected: res.ContentLength})
		h2_bundle.go#L9568: 	cs.bytesRemain = res.ContentLength
		h2_bundle.go#L9574: 		res.ContentLength = -1
		response.go#L78: 	ContentLength int64
		response.go#L266: 	if r1.ContentLength == 0 && r1.Body != nil {
		response.go#L278: 			r1.ContentLength = -1
		response.go#L292: 	if r1.ContentLength == -1 && !r1.Close && r1.ProtoAtLeast(1, 1) && !chunked(r1.TransferEncoding) && !r1.Uncompressed {
		response.go#L315: 	if r1.ContentLength == 0 && !chunked(r1.TransferEncoding) && !contentLengthAlreadySent && bodyAllowedForStatus(r.StatusCode) {
		transfer.go#L116: 		t.ContentLength = rr.ContentLength
		transfer.go#L592: 		rr.ContentLength = t.ContentLength
		transport.go#L2158: 		hasBody := rc.req.Method != "HEAD" && resp.ContentLength != 0
		transport.go#L2225: 			resp.ContentLength = -1