X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a5d46b7362198fd94a5fd3b751df86287f2187bc..b2bb920ff6dc4868a987976336f74543bcda3046:/src/common/url.cpp diff --git a/src/common/url.cpp b/src/common/url.cpp index f10cd6c903..bccda3d90f 100644 --- a/src/common/url.cpp +++ b/src/common/url.cpp @@ -6,10 +6,10 @@ // Created: 20/07/1997 // RCS-ID: $Id$ // Copyright: (c) 1997, 1998 Guilhem Lavaux -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "url.h" #endif @@ -65,7 +65,7 @@ wxURL::wxURL(const wxString& url) #if wxUSE_SOCKETS if ( ms_useDefaultProxy && !ms_proxyDefault ) { - SetDefaultProxy(getenv("HTTP_PROXY")); + SetDefaultProxy( wxGetenv(wxT("HTTP_PROXY")) ); if ( !ms_proxyDefault ) { @@ -387,7 +387,7 @@ void wxURL::SetProxy(const wxString& url_proxy) return; hostname = tmp_str(0, pos); - port = tmp_str(pos, tmp_str.Length()-pos); + port = tmp_str(pos+1, tmp_str.Length()-pos); addr.Hostname(hostname); addr.Service(port); @@ -464,12 +464,16 @@ wxString wxURL::ConvertFromURI(const wxString& uri) i++; if (uri[i] >= wxT('A') && uri[i] <= wxT('F')) code = (uri[i] - wxT('A') + 10) * 16; + else if (uri[i] >= wxT('a') && uri[i] <= wxT('f')) + code = (uri[i] - wxT('a') + 10) * 16; else code = (uri[i] - wxT('0')) * 16; i++; if (uri[i] >= wxT('A') && uri[i] <= wxT('F')) code += (uri[i] - wxT('A')) + 10; + else if (uri[i] >= wxT('a') && uri[i] <= wxT('f')) + code += (uri[i] - wxT('a')) + 10; else code += (uri[i] - wxT('0'));