|
From: <at...@us...> - 2007-08-22 18:08:19
|
Revision: 485
http://cadcdev.svn.sourceforge.net/cadcdev/?rev=485&view=rev
Author: atani
Date: 2007-08-22 11:08:17 -0700 (Wed, 22 Aug 2007)
Log Message:
-----------
prefix final boundry in POST with "--"
Modified Paths:
--------------
tiki/src/net/http/useragent.cpp
Modified: tiki/src/net/http/useragent.cpp
===================================================================
--- tiki/src/net/http/useragent.cpp 2007-08-22 17:46:32 UTC (rev 484)
+++ tiki/src/net/http/useragent.cpp 2007-08-22 18:08:17 UTC (rev 485)
@@ -143,7 +143,8 @@
socket->send(headerBuf);
socket->send(buf);
}
- std::string footerText = req->getBoundaryMarker();
+ std::string footerText = "--";
+ footerText.append(req->getBoundaryMarker());
footerText.append("--\r\n");
RefPtr<Buffer> footerBuf = new Buffer(2048);
footerBuf->setData((uint8 *)footerText.c_str(), footerText.size());
@@ -215,7 +216,7 @@
std::list<std::string> content = request->getContentPartNames();
if(!mode.compare("POST") && content.size() > 1) {
- uint64 totalSize = request->getBoundaryMarker().size() + 4; // add 4 to account for --\r\n
+ uint64 totalSize = request->getBoundaryMarker().size() + 6; // add 6 to account for "--<boundary>--\r\n"
for(std::list<std::string>::iterator iter = content.begin();
iter != content.end();
++iter) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|