X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c1dc9f8394c1488ad8e7d945e6f943f7b34554ce..12b5f4b4d2d8a07962da7ba3b78c8c1ec2634a67:/src/common/url.cpp diff --git a/src/common/url.cpp b/src/common/url.cpp index 7c6ae67075..ea5cc02230 100644 --- a/src/common/url.cpp +++ b/src/common/url.cpp @@ -242,11 +242,11 @@ wxInputStream *wxURL::GetInputStream() size_t dwPasswordPos = m_userinfo.find(':'); if (dwPasswordPos == wxString::npos) - m_protocol->SetUser(m_userinfo); + m_protocol->SetUser(Unescape(m_userinfo)); else { - m_protocol->SetUser(m_userinfo(0, dwPasswordPos)); - m_protocol->SetPassword(m_userinfo(dwPasswordPos+1, m_userinfo.length() + 1)); + m_protocol->SetUser(Unescape(m_userinfo(0, dwPasswordPos))); + m_protocol->SetPassword(Unescape(m_userinfo(dwPasswordPos+1, m_userinfo.length() + 1))); } } @@ -406,6 +406,8 @@ void wxURL::SetProxy(const wxString& url_proxy) class wxURLModule : public wxModule { public: + wxURLModule(); + virtual bool OnInit(); virtual void OnExit(); @@ -415,6 +417,13 @@ private: IMPLEMENT_DYNAMIC_CLASS(wxURLModule, wxModule) +wxURLModule::wxURLModule() +{ + // we must be cleaned up before wxSocketModule as otherwise deleting + // ms_proxyDefault from our OnExit() won't work (and can actually crash) + AddDependency(wxClassInfo::FindClass(_T("wxSocketModule"))); +} + bool wxURLModule::OnInit() { #if wxUSE_PROTOCOL_HTTP