diff --git a/docs/changes.txt b/docs/changes.txt index 3d6053886d..44482c80e6 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -531,6 +531,7 @@ All: - Add wxDir::Close() method (Silverstorm82). - Fix compilation of wxHash{Map,Set} with g++ 4.7 (Nathan Ridge). +- Fix posting large amounts of data in wxHTTP (Platonides). - Added Nepali translation (Him Prasad Gautam). All (GUI): diff --git a/src/common/http.cpp b/src/common/http.cpp index f041115be9..f70b6fe9da 100644 --- a/src/common/http.cpp +++ b/src/common/http.cpp @@ -388,8 +388,11 @@ bool wxHTTP::BuildRequest(const wxString& path, wxHTTP_Req req) SaveState(); // we may use non blocking sockets only if we can dispatch events from them - SetFlags( wxIsMainThread() && wxApp::IsMainLoopRunning() ? wxSOCKET_NONE - : wxSOCKET_BLOCK ); + int flags = wxIsMainThread() && wxApp::IsMainLoopRunning() ? wxSOCKET_NONE + : wxSOCKET_BLOCK; + // and we must use wxSOCKET_WAITALL to ensure that all data is sent + flags |= wxSOCKET_WAITALL; + SetFlags(flags); Notify(false); wxString buf;