diff --git a/src/client_side.cc b/src/client_side.cc index 839b0b8..f1548bb 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -3975,7 +3975,8 @@ ConnStateData::finishDechunkingRequest(bool withSuccess) if (withSuccess) { Must(myPipe->bodySizeKnown()); ClientSocketContext::Pointer context = getCurrentContext(); - if (context != NULL && context->http && context->http->request) + if (context != NULL && context->http && context->http->request && + clientIsContentLengthValid(context->http->request)) context->http->request->setContentLength(myPipe->bodySize()); } }