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
![]() |
The pages are generated with Golds v0.7.6. (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. |