(err)
| 6670 | } |
| 6671 | const bodyLength = util.bodyLength(body); |
| 6672 | contentLength = bodyLength != null ? bodyLength : contentLength; |
| 6673 | if (contentLength === null) { |
| 6674 | contentLength = request.contentLength; |
| 6675 | } |
| 6676 | if (contentLength === 0 && !expectsPayload) { |
| 6677 | contentLength = null; |
| 6678 | } |
| 6679 | if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength !== null && request.contentLength !== contentLength) { |
| 6680 | if (client[kStrictContentLength]) { |
| 6681 | util.errorRequest(client, request, new RequestContentLengthMismatchError()); |
| 6682 | return false; |
no test coverage detected