I am new to POC 1.4.5 and have made a test program to upload a file to a php http server [http://posttestserver.com].
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:
if (path.empty()) path = "/";
*(new HTTPClientSession(uri.getHost(), uri.getPort())));
for (unsigned int ix( 0 ); ix < ITERATIONS; ix++)
HTTPRequest::HTTP_POST, path, HTTPMessage::HTTP_1_1)));
HTMLForm &form (
*(new HTMLForm( HTMLForm::ENCODING_MULTIPART ) ) );
new FilePartSource (
//Determine content-length from form data
//Reset the form stream to begining of file
static_cast<unsigned int> (formString.length()));
std::ostream &send = session.sendRequest(request);
//----- other code to handle response here...
} //For Loop