diff --git a/util/httpclient.cpp b/util/httpclient.cpp index b6f7e327e0f..08b6220569e 100644 --- a/util/httpclient.cpp +++ b/util/httpclient.cpp @@ -73,7 +73,13 @@ namespace mongo { ss << "Host: " << host << "\r\n"; ss << "Connection: Close\r\n"; ss << "User-Agent: mongodb http client\r\n"; + if ( body ) { + ss << "Content-Length: " << strlen( body ) << "\r\n"; + } ss << "\r\n"; + if ( body ) { + ss << body; + } req = ss.str(); }