X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e03e94b03776799d428e5d54dd6b4a90055df8cd..af7e24c33e1e6e00a7687ee965b921dbe60cdb36:/src/common/url.cpp diff --git a/src/common/url.cpp b/src/common/url.cpp index ea5cc02230..cbca1ffeb3 100644 --- a/src/common/url.cpp +++ b/src/common/url.cpp @@ -30,7 +30,6 @@ #include #include -IMPLEMENT_CLASS(wxProtoInfo, wxObject) IMPLEMENT_CLASS(wxURL, wxURI) // Protocols list @@ -267,7 +266,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 +286,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 +426,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 +437,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; }