X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7921a093fac2c72b3e981caf1007d98ca767629d..ab52bac815bed0189bb0ba3b52a15e093c354533:/src/common/url.cpp diff --git a/src/common/url.cpp b/src/common/url.cpp index b48d5dabe7..4d68232825 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))); } } @@ -267,7 +267,11 @@ wxInputStream *wxURL::GetInputStream() wxIPV4address addr; // m_protoinfo is NULL when we use a proxy - if (!m_useProxy && m_protoinfo->m_needhost) + if ( +#if wxUSE_PROTOCOL_HTTP + !m_useProxy && +#endif // wxUSE_PROTOCOL_HTTP + m_protoinfo->m_needhost ) { if (!addr.Hostname(m_server)) { @@ -283,13 +287,15 @@ wxInputStream *wxURL::GetInputStream() return NULL; } } -#endif +#endif // wxUSE_SOCKETS wxString fullPath; +#if wxUSE_PROTOCOL_HTTP // When we use a proxy, we have to pass the whole URL to it. if (m_useProxy) fullPath += m_url; +#endif // wxUSE_PROTOCOL_HTTP if(m_path.empty()) fullPath += wxT("/"); @@ -421,7 +427,7 @@ 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"))); + AddDependency(wxClassInfo::FindClass(wxT("wxSocketModule"))); } bool wxURLModule::OnInit() @@ -432,7 +438,7 @@ bool wxURLModule::OnInit() // down the program startup (especially if there is no DNS server // available, in which case it may take up to 1 minute) - if ( wxGetenv(_T("HTTP_PROXY")) ) + if ( wxGetenv(wxT("HTTP_PROXY")) ) { wxURL::ms_useDefaultProxy = true; }