applied patch 90459
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28247 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -218,6 +218,8 @@ bool wxHTTP::BuildRequest(const wxString& path, wxHTTP_Req req)
|
|||||||
break;
|
break;
|
||||||
case wxHTTP_POST:
|
case wxHTTP_POST:
|
||||||
request = wxT("POST");
|
request = wxT("POST");
|
||||||
|
if ( GetHeader( wxT("Content-Length") ).IsNull() )
|
||||||
|
SetHeader( wxT("Content-Length"), wxString::Format( wxT("%ld"), m_post_buf.Len() ) );
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@@ -230,7 +232,7 @@ bool wxHTTP::BuildRequest(const wxString& path, wxHTTP_Req req)
|
|||||||
SetHeader(wxT("User-Agent"), wxT("wxWidgets 2.x"));
|
SetHeader(wxT("User-Agent"), wxT("wxWidgets 2.x"));
|
||||||
|
|
||||||
SaveState();
|
SaveState();
|
||||||
SetFlags(wxSOCKET_NONE);
|
SetFlags( wxThread::IsMain() ? wxSOCKET_NONE : wxSOCKET_BLOCK );
|
||||||
Notify(FALSE);
|
Notify(FALSE);
|
||||||
|
|
||||||
wxString buf;
|
wxString buf;
|
||||||
@@ -241,7 +243,7 @@ bool wxHTTP::BuildRequest(const wxString& path, wxHTTP_Req req)
|
|||||||
Write("\r\n", 2);
|
Write("\r\n", 2);
|
||||||
|
|
||||||
if ( req == wxHTTP_POST ) {
|
if ( req == wxHTTP_POST ) {
|
||||||
Write(m_post_buf, m_post_buf.Len());
|
Write(m_post_buf.mbc_str(), m_post_buf.Len());
|
||||||
m_post_buf = wxEmptyString;
|
m_post_buf = wxEmptyString;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user