| Index: net/server/http_server_response_info.cc
|
| diff --git a/net/server/http_server_response_info.cc b/net/server/http_server_response_info.cc
|
| index e4c6043aa8d627a76aed82eb08b774da55a91412..2d0a32e6cce1752ac56e828e7f4d96fc808506f8 100644
|
| --- a/net/server/http_server_response_info.cc
|
| +++ b/net/server/http_server_response_info.cc
|
| @@ -41,8 +41,14 @@ void HttpServerResponseInfo::SetBody(const std::string& body,
|
| const std::string& content_type) {
|
| DCHECK(body_.empty());
|
| body_ = body;
|
| + SetContentHeaders(body.length(), content_type);
|
| +}
|
| +
|
| +void HttpServerResponseInfo::SetContentHeaders(
|
| + size_t content_length,
|
| + const std::string& content_type) {
|
| AddHeader(HttpRequestHeaders::kContentLength,
|
| - base::StringPrintf("%" PRIuS, body.length()));
|
| + base::StringPrintf("%" PRIuS, content_length));
|
| AddHeader(HttpRequestHeaders::kContentType, content_type);
|
| }
|
|
|
|
|