outgoingLength reports the Content-Length of this outgoing (Client) request. It maps 0 into -1 (unknown) when the Body is non-nil.
(r *http.Request)
| 68 | // outgoingLength reports the Content-Length of this outgoing (Client) request. |
| 69 | // It maps 0 into -1 (unknown) when the Body is non-nil. |
| 70 | func outgoingLength(r *http.Request) int64 { |
| 71 | if r.Body == nil || r.Body == NoBody { |
| 72 | return 0 |
| 73 | } |
| 74 | if r.ContentLength != 0 { |
| 75 | return r.ContentLength |
| 76 | } |
| 77 | return -1 |
| 78 | } |
| 79 | |
| 80 | // errMissingHost is returned by Write when there is no Host or URL present in |
| 81 | // the Request. |
no outgoing calls
no test coverage detected
searching dependent graphs…