Windows file uploads slower than OS X and Linux

Please post support and help requests here.
Posts: 2
Joined: 10 Dec 2012, 17:30

Windows file uploads slower than OS X and Linux

Postby bstewart33 » 14 Dec 2012, 23:42

I am new to POC 1.4.5 and have made a test program to upload a file to a php http server [].

The following code I built under MAC OS X(10.8.2) and WIndows Server 2008 R2 Server. When I run the program with a 10MB file, under the MAC I get upload speeds around 10m/s, under windows I get 2m/s. I am using the HTMLForm part method to uoload the file. I also had to turn off chunked transfer encoding due the server not supporting chunked transfer encoding.

Are there other parameters that can be set for windows in order to get speeds equivilant to the MAC?

Here is my code:
URI uri(argv[1]);
std::string path(uri.getPathAndQuery());
if (path.empty()) path = "/";

std::string uploadFilename(argv[2]);

HTTPClientSession &session(
*(new HTTPClientSession(uri.getHost(), uri.getPort())));

for (unsigned int ix( 0 ); ix < ITERATIONS; ix++)
HTTPRequest &request(
*(new HTTPRequest(
HTTPRequest::HTTP_POST, path, HTTPMessage::HTTP_1_1)));

HTMLForm &form (

FilePartSource *partSource(
new FilePartSource (
uploadFilename, "application/octet-stream"));
//uploadFilename, "Text/Plain"));

std::istream &partStream(partSource->stream());

form.addPart("upload", partSource);


//Determine content-length from form data
std::stringstream ss;
std::string formString(ss.str());

//Reset the form stream to begining of file

static_cast<unsigned int> (formString.length()));

std::ostream &send = session.sendRequest(request);

form.write (send);

//----- other code to handle response here...

delete &form;
delete &request;
} //For Loop

delete &session;

Return to “Support”

Who is online

Users browsing this forum: No registered users and 3 guests