+ m_useProxy = false;
+ }
+ else
+ {
+ wxString tmp_str;
+ wxString hostname, port;
+ int pos;
+ wxIPV4address addr;
+
+ tmp_str = url_proxy;
+ pos = tmp_str.Find(wxT(':'));
+ // This is an invalid proxy name.
+ if (pos == wxNOT_FOUND)
+ return;
+
+ hostname = tmp_str(0, pos);
+ port = tmp_str(pos+1, tmp_str.Length()-pos);
+
+ addr.Hostname(hostname);
+ addr.Service(port);
+
+ // Finally, create the whole stuff.
+ if (m_proxy && m_proxy != ms_proxyDefault)
+ delete m_proxy;
+ m_proxy = new wxHTTP();
+ m_proxy->Connect(addr, true); // Watcom needs the 2nd arg for some reason
+
+ CleanData();
+ // Reparse url.
+ m_useProxy = true;
+ ParseURL();
+ }
+}
+#endif // wxUSE_PROTOCOL_HTTP
+
+// ----------------------------------------------------------------------
+// wxURLModule
+//
+// A module which deletes the default proxy if we created it
+// ----------------------------------------------------------------------