diff --git a/http/HttpMessage.h b/http/HttpMessage.h index cc779c32d..17ee731af 100644 --- a/http/HttpMessage.h +++ b/http/HttpMessage.h @@ -297,6 +297,7 @@ class HV_EXPORT HttpMessage { void* Content() { if (content == NULL && body.size() != 0) { content = (void*)body.data(); + content_length = body.size(); } return content; } diff --git a/http/server/HttpHandler.cpp b/http/server/HttpHandler.cpp index 11450b4e8..5515573cd 100644 --- a/http/server/HttpHandler.cpp +++ b/http/server/HttpHandler.cpp @@ -1098,7 +1098,7 @@ int HttpHandler::sendProxyRequest() { req->headers["Connection"] = keepalive ? "keep-alive" : "close"; req->headers["X-Real-IP"] = ip; // NOTE: send head + received body - std::string msg = req->Dump(true, true); + std::string msg = req->Dump(true, false) + req->body; // printf("%s\n", msg.c_str()); req->Reset();