X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/14f355c2b5c71fc7c3d680aea366582d2ac60f7b..0f314c30b8c4ffbd7d87146f72be7a061d506235:/src/common/http.cpp diff --git a/src/common/http.cpp b/src/common/http.cpp index 3f5a86b4ae..63e0fb4fb9 100644 --- a/src/common/http.cpp +++ b/src/common/http.cpp @@ -44,6 +44,7 @@ wxHTTP::wxHTTP() m_read = FALSE; m_proxy_mode = FALSE; m_post_buf = wxEmptyString; + m_http_response = 0; SetNotify(wxSOCKET_LOST_FLAG); } @@ -213,6 +214,8 @@ bool wxHTTP::BuildRequest(const wxString& path, wxHTTP_Req req) return FALSE; } + m_http_response = 0; + // If there is no User-Agent defined, define it. if (GetHeader(wxT("User-Agent")).IsNull()) SetHeader(wxT("User-Agent"), wxT("wxWindows 2.x")); @@ -256,6 +259,8 @@ bool wxHTTP::BuildRequest(const wxString& path, wxHTTP_Req req) token.NextToken(); tmp_str2 = token.NextToken(); + m_http_response = wxAtoi(tmp_str2); + switch (tmp_str2[0u]) { case wxT('1'): /* INFORMATION / SUCCESS */