X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ce195ee63259e9a70136adef1ddcec4132647f96..b9efe021b554fa3967d1442cf758435c5cd5ae8f:/src/common/url.cpp diff --git a/src/common/url.cpp b/src/common/url.cpp index 46f40e2300..dfd818b176 100644 --- a/src/common/url.cpp +++ b/src/common/url.cpp @@ -162,9 +162,6 @@ bool wxURL::ParseURL() #if wxUSE_PROTOCOL_HTTP if (m_useProxy) { - // destroy the previously created protocol as we'll be using m_proxy - delete m_protocol; - // Third, we rebuild the URL. m_url = m_scheme + wxT(":"); if (m_protoinfo->m_needhost) @@ -239,16 +236,16 @@ wxInputStream *wxURL::GetInputStream() } m_error = wxURL_NOERR; - if (HasUser()) + if (HasUserInfo()) { - size_t dwPasswordPos = m_user.find(':'); + size_t dwPasswordPos = m_userinfo.find(':'); if (dwPasswordPos == wxString::npos) - m_protocol->SetUser(m_user); + m_protocol->SetUser(m_userinfo); else { - m_protocol->SetUser(m_user(0, dwPasswordPos)); - m_protocol->SetPassword(m_user(dwPasswordPos+1, m_user.length() + 1)); + m_protocol->SetUser(m_userinfo(0, dwPasswordPos)); + m_protocol->SetPassword(m_userinfo(dwPasswordPos+1, m_userinfo.length() + 1)); } } @@ -426,7 +423,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 ( getenv("HTTP_PROXY") ) + if ( wxGetenv(_T("HTTP_PROXY")) ) { wxURL::ms_useDefaultProxy = true; }