0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-30 00:56:44 +01:00

include body in httpclient POSTs

This commit is contained in:
Mike Dirolf 2010-02-12 14:19:57 -05:00
parent 202d0e55f3
commit c468109cbe

View File

@ -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();
}