net/http.Response.ContentLength (field)
21 uses
net/http (current package)
client.go#L294: if resp.ContentLength > 0 && req.Method != "HEAD" {
client.go#L295: 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#L714: if resp.ContentLength == -1 || resp.ContentLength <= maxBodySlurpSize {
filetransport.go#L115: pr.res.ContentLength = -1
h2_bundle.go#L9768: res.ContentLength = -1
h2_bundle.go#L9771: res.ContentLength = int64(cl)
h2_bundle.go#L9780: res.ContentLength = 0
h2_bundle.go#L9789: if res.ContentLength > 0 {
h2_bundle.go#L9797: cs.bufPipe.setBuffer(&http2dataBuffer{expected: res.ContentLength})
h2_bundle.go#L9798: cs.bytesRemain = res.ContentLength
h2_bundle.go#L9804: 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#L118: t.ContentLength = rr.ContentLength
transfer.go#L597: rr.ContentLength = t.ContentLength
transport.go#L2370: hasBody := rc.treq.Request.Method != "HEAD" && resp.ContentLength != 0
transport.go#L2437: resp.ContentLength = -1
![]() |
The pages are generated with Golds v0.8.4. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |