+ // 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 == T(' '))
+ out_str += T('+');
+ else {
+ if (!isalpha(c) && c != T('.') && c != T('+') && c != T('/')) {
+ hexa_code.Printf(T("%%%02X"), c);
+ out_str += hexa_code;
+ } else
+ out_str += c;
+ }
+ }