From 646d8014ec513a310ce75a3d51659295686e236b Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 12 Jan 2021 02:54:13 +0100 Subject: [PATCH] Check if specified HTTP method is incompatible with posting data Currently data can be used with POST or PUT HTTP methods only. --- src/common/webrequest_curl.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/common/webrequest_curl.cpp b/src/common/webrequest_curl.cpp index 075b49cdd4..25c2ec28ed 100644 --- a/src/common/webrequest_curl.cpp +++ b/src/common/webrequest_curl.cpp @@ -219,6 +219,12 @@ void wxWebRequestCURL::Start() curl_easy_setopt(m_handle, CURLOPT_INFILESIZE_LARGE, static_cast(m_dataSize)); } + else + { + wxFAIL_MSG(wxString::Format( + "Supplied data is ignored when using method %s", m_method + )); + } } if ( m_method.CmpNoCase("HEAD") == 0 )