// 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;
                     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());
         }
     }