]> git.saurik.com Git - wxWidgets.git/commitdiff
don't use m_useProxy if !wxUSE_PROTOCOL_HTTP (see #10815)
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 20 May 2009 23:02:21 +0000 (23:02 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 20 May 2009 23:02:21 +0000 (23:02 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60703 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/url.h
src/common/url.cpp

index 5faae15fb9c3984fc881e60539039f64f8787ce9..c74abf302c537755bb8e1dce7ebd38947ca4bafe 100644 (file)
@@ -78,6 +78,7 @@ protected:
     static wxHTTP *ms_proxyDefault;
     static bool ms_useDefaultProxy;
     wxHTTP *m_proxy;
+    bool m_useProxy;
 #endif // wxUSE_PROTOCOL_HTTP
 
 #if wxUSE_URL_NATIVE
@@ -87,13 +88,13 @@ protected:
     // Creates on the heap and returns a native
     // implementation object for the current platform.
     static wxURLNativeImp *CreateNativeImpObject();
-#endif
+#endif // wxUSE_URL_NATIVE
+
     wxProtoInfo *m_protoinfo;
     wxProtocol *m_protocol;
 
     wxURLError m_error;
     wxString m_url;
-    bool m_useProxy;
 
     void Init(const wxString&);
     bool ParseURL();
index ea5cc02230fad76002e3878c5106f06a2e1a8bc0..7302b06585a9b3999212e3d15ea281544980e20a 100644 (file)
@@ -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("/");