Check if specified HTTP method is incompatible with posting data

Currently data can be used with POST or PUT HTTP methods only.
This commit is contained in:
Vadim Zeitlin
2021-01-12 02:54:13 +01:00
parent 7af2f29602
commit 646d8014ec

View File

@@ -219,6 +219,12 @@ void wxWebRequestCURL::Start()
curl_easy_setopt(m_handle, CURLOPT_INFILESIZE_LARGE,
static_cast<curl_off_t>(m_dataSize));
}
else
{
wxFAIL_MSG(wxString::Format(
"Supplied data is ignored when using method %s", m_method
));
}
}
if ( m_method.CmpNoCase("HEAD") == 0 )