X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b8bafcaad8c0a94d2a7e09d28fe7df540fb551f5..c7382f913cc2d3ddcc782b876574c58865e7d842:/src/common/http.cpp diff --git a/src/common/http.cpp b/src/common/http.cpp index 21381bd83a..0e7d3a3346 100644 --- a/src/common/http.cpp +++ b/src/common/http.cpp @@ -219,7 +219,7 @@ bool wxHTTP::BuildRequest(const wxString& path, wxHTTP_Req req) case wxHTTP_POST: request = wxT("POST"); if ( GetHeader( wxT("Content-Length") ).IsNull() ) - SetHeader( wxT("Content-Length"), wxString::Format( wxT("%ld"), m_post_buf.Len() ) ); + SetHeader( wxT("Content-Length"), wxString::Format( wxT("%lu"), (unsigned long)m_post_buf.Len() ) ); break; default: return FALSE; @@ -232,7 +232,11 @@ bool wxHTTP::BuildRequest(const wxString& path, wxHTTP_Req req) SetHeader(wxT("User-Agent"), wxT("wxWidgets 2.x")); SaveState(); +#if wxUSE_THREADS SetFlags( wxThread::IsMain() ? wxSOCKET_NONE : wxSOCKET_BLOCK ); +#else + SetFlags( wxSOCKET_NONE ); +#endif Notify(FALSE); wxString buf;