+ // Finally, create the whole stuff.
+ if (m_proxy && m_proxy != g_proxy)
+ 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
+
+wxString wxURL::ConvertToValidURI(const wxString& uri)
+{
+ wxString out_str;
+ wxString hexa_code;
+ size_t i;
+
+ for (i=0;i<uri.Len();i++) {
+ wxChar c = uri.GetChar(i);
+
+ if (c == wxT(' '))
+ out_str += wxT('+');
+ else {
+ if (!isalpha(c) && c != wxT('.') && c != wxT('+') && c != wxT('/')) {
+ hexa_code.Printf(wxT("%%%02X"), c);
+ out_str += hexa_code;
+ } else
+ out_str += c;
+ }
+ }
+
+ return out_str;
+}