wxProtoInfo *wxURL::g_protocols = NULL;
wxHTTP *wxURL::g_proxy;
-/////////////////////////////////////////////////////////////////
-// wxURL ////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////
+// --------------------------------------------------------------
+// wxURL
+// --------------------------------------------------------------
-/*
- * --------------------------------------------------------------
- * --------- wxURL CONSTRUCTOR DESTRUCTOR -----------------------
- * --------------------------------------------------------------
- */
+// --------------------------------------------------------------
+// --------- wxURL CONSTRUCTOR DESTRUCTOR -----------------------
+// --------------------------------------------------------------
wxURL::wxURL(const wxString& url)
{
CleanData();
}
-/*
- * --------------------------------------------------------------
- * --------- wxURL urls decoders --------------------------------
- * --------------------------------------------------------------
- */
+// --------------------------------------------------------------
+// --------- wxURL urls decoders --------------------------------
+// --------------------------------------------------------------
+
bool wxURL::PrepProto(wxString& url)
{
int pos;
return FALSE;
}
-/*
- * --------------------------------------------------------------
- * --------- wxURL get ------------------------------------------
- * --------------------------------------------------------------
- */
+// --------------------------------------------------------------
+// --------- wxURL get ------------------------------------------
+// --------------------------------------------------------------
+
wxInputStream *wxURL::GetInputStream(void)
{
wxIPV4address addr;
m_path = url_proxy;
}
+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 (!isalpha(c) && c != _T('.') && c != _T('+') && c != _T('.') &&
+ c != _T('/')) {
+ hexa_code.Printf(_T("%02X"), c);
+ out_str += hexa_code;
+ } else
+ out_str += c;
+ }
+
+ return out_str;
+}
+
#endif
// wxUSE_SOCKETS