net/http.Response.ContentLength (field)

21 uses

	net/http (current package)
		client.go#L289: 		if resp.ContentLength > 0 && req.Method != "HEAD" {
		client.go#L290: 			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#L712: 			if resp.ContentLength == -1 || resp.ContentLength <= maxBodySlurpSize {
		filetransport.go#L114: 		pr.res.ContentLength = -1
		h2_bundle.go#L9695: 	res.ContentLength = -1
		h2_bundle.go#L9698: 			res.ContentLength = int64(cl)
		h2_bundle.go#L9707: 		res.ContentLength = 0
		h2_bundle.go#L9716: 		if res.ContentLength > 0 {
		h2_bundle.go#L9724: 	cs.bufPipe.setBuffer(&http2dataBuffer{expected: res.ContentLength})
		h2_bundle.go#L9725: 	cs.bytesRemain = res.ContentLength
		h2_bundle.go#L9731: 		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#L117: 		t.ContentLength = rr.ContentLength
		transfer.go#L596: 		rr.ContentLength = t.ContentLength
		transport.go#L2245: 		hasBody := rc.treq.Request.Method != "HEAD" && resp.ContentLength != 0
		transport.go#L2312: 			resp.ContentLength = -1