summaryrefslogtreecommitdiff
path: root/util/httpclient.cpp
diff options
context:
space:
mode:
authorMike Dirolf <mike@10gen.com>2010-02-12 14:19:57 -0500
committerMike Dirolf <mike@10gen.com>2010-02-12 14:19:57 -0500
commitc468109cbe6bae05e90eab43802d676b11f3c80b (patch)
treefe0590211a295bf9ae1fa60d6917c8081a506552 /util/httpclient.cpp
parent202d0e55f3ff3490b679bf81c5b5c89865b7ee57 (diff)
downloadmongo-c468109cbe6bae05e90eab43802d676b11f3c80b.tar.gz
include body in httpclient POSTs
Diffstat (limited to 'util/httpclient.cpp')
-rw-r--r--util/httpclient.cpp6
1 files changed, 6 insertions, 0 deletions
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();
}