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
Messages: 1308 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
|
|
|
Goto Forum:
Current Time: Tue May 13 14:12:57 CEST 2025
Total time taken to generate the page: 0.02946 seconds
|