X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bafd830636e54f3bf33910993a61e2972e99e2ca..28354d90fce9a6b1f8ccdf713602992fb5c7ccbb:/src/common/uri.cpp diff --git a/src/common/uri.cpp b/src/common/uri.cpp index 52b11eb5af..ccc0149a4b 100644 --- a/src/common/uri.cpp +++ b/src/common/uri.cpp @@ -432,11 +432,18 @@ const wxChar* wxURI::ParseAuthority(const wxChar* uri) // authority = [ userinfo "@" ] host [ ":" port ] if (*uri == wxT('/') && *(uri+1) == wxT('/')) { + //skip past the two slashes uri += 2; + // ############# DEVIATION FROM RFC ######################### + // Don't parse the server component for file URIs + if(m_scheme != wxT("file")) + { + //normal way uri = ParseUserInfo(uri); uri = ParseServer(uri); return ParsePort(uri); + } } return uri; @@ -882,8 +889,8 @@ void wxURI::Resolve(const wxURI& base, int flags) op += 3; } - m_path = (wxString)base.m_path.substr(0, bp - base.m_path.c_str()) + - (wxString)m_path.substr((op - m_path.c_str()), m_path.Length()); + m_path = base.m_path.substr(0, bp - base.m_path.c_str()) + + m_path.substr((op - m_path.c_str()), m_path.Length()); } }