Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ MT-multithreading and servers » HTTP Client - Post method and progress bar
HTTP Client - Post method and progress bar [message #18831] Sat, 25 October 2008 20:30
mdelfede is currently offline  mdelfede
Messages: 1307
Registered: September 2007
Ultimate Contributor
I've noticed that progress stuff don't work well when posting big files; the progress function is never called when sending the data.
So, with a small change that can be arranged; in httpcli.cpp, around line 182 :
int nwrite = socket.WriteWait(request.GetIter(written), request.GetLength() - written, 1000);


can be replaced with

int nwrite = socket.WriteWait(request.GetIter(written), min(request.GetLength() - written, 1000), 1000);


So the progress gate is called every 1000 Bytes sent. That gives a very smooth progress bar behavious when sending files via post method.

Ciao

Max
Previous Topic: Web package: is there file upload support?
Next Topic: uploading progress
Goto Forum:
  


Current Time: Sat Apr 20 04:49:50 CEST 2024

Total time taken to generate the page: 0.04626 seconds