--- tools/inc/tools/urlobj.hxx	2007-07-26 18:08:47.000000000 +0200
+++ tools/inc/tools/urlobj.hxx	2007-07-26 20:10:16.000000000 +0200
@@ -162,9 +162,10 @@ enum INetProtocol
     INET_PROT_TELNET = 28,
     INET_PROT_VND_SUN_STAR_EXPAND = 29,
     INET_PROT_VND_SUN_STAR_TDOC = 30,
-    INET_PROT_GENERIC = 31,
-    INET_PROT_SMB = 32,
-	INET_PROT_END = 33
+    INET_PROT_SMB = 31,
+    INET_PROT_GENERIC = 32,
+    INET_PROT_GENERIC_HIERARCHICAL = 33,
+    INET_PROT_END = 34
 };
 
 //============================================================================
--- tools/source/fsys/urlobj.cxx	2007-07-26 18:08:47.000000000 +0200
+++ tools/source/fsys/urlobj.cxx	2007-07-26 20:11:17.000000000 +0200
@@ -460,9 +460,11 @@ static INetURLObject::SchemeInfo const a
 		  false, false, false, false, false },
         { "vnd.sun.star.tdoc", "vnd.sun.star.tdoc:", 0, false, false, false,
           false, false, false, true, false },
-        { "", "", 0, false, false, false, false, false, false, false, false },
         { "smb", "smb://", 139, true, true, false, true, true, true, true,
-          true } };
+          true },
+        { "", "", 0, false, false, false, false, false, false, false, false },
+        { "", "", 0, false, false, false, false, false, false, true, false }
+      };
 
 // static
 inline INetURLObject::SchemeInfo const &
@@ -869,7 +871,10 @@ bool INetURLObject::setAbsURIRef(rtl::OU
             aSynScheme = parseScheme(&p1, pEnd, nFragmentDelimiter);
             if (aSynScheme.getLength() > 0)
             {
-                m_eScheme = INET_PROT_GENERIC;
+                if (p1 != pEnd && *p1 == '/')
+                    m_eScheme = INET_PROT_GENERIC_HIERARCHICAL;
+                else
+                    m_eScheme = INET_PROT_GENERIC;
                 pPos = p1;
             }
         }
@@ -886,8 +891,9 @@ bool INetURLObject::setAbsURIRef(rtl::OU
 			return false;
 		}
 
-        if (m_eScheme != INET_PROT_GENERIC) {
-            aSynScheme = rtl::OUString::createFromAscii(getSchemeInfo().m_pScheme);
+        const char *pSchemeName = getSchemeInfo().m_pScheme;
+        if (pSchemeName[0] != '\0') {
+            aSynScheme = rtl::OUString::createFromAscii(pSchemeName);
         }
         m_aScheme.set(aSynAbsURIRef, aSynScheme, aSynAbsURIRef.getLength());
         aSynAbsURIRef.append(sal_Unicode(':'));
@@ -3392,6 +3398,7 @@ bool INetURLObject::parsePath(INetProtoc
 			break;
 
         case INET_PROT_GENERIC:
+        case INET_PROT_GENERIC_HIERARCHICAL:
 			while (pPos < pEnd && *pPos != nFragmentDelimiter)
 			{
 				EscapeType eEscapeType;
@@ -4093,10 +4100,13 @@ bool INetURLObject::ConcatData(INetProto
 {
 	setInvalid();
 	m_eScheme = eTheScheme;
-	if (HasError() || m_eScheme == INET_PROT_GENERIC)
+	const char *pSchemeName = getSchemeInfo().m_pScheme;
+
+	if (HasError() || pSchemeName[0] == '\0')
 		return false;
+
 	m_aAbsURIRef.setLength(0);
-	m_aAbsURIRef.appendAscii(getSchemeInfo().m_pScheme);
+	m_aAbsURIRef.appendAscii(pSchemeName);
 	m_aAbsURIRef.append(sal_Unicode(':'));
 	if (getSchemeInfo().m_bAuthority)
 	{
--- tools/workben/urltest.cxx	2007-06-28 00:22:35.000000000 +0200
+++ tools/workben/urltest.cxx	2007-07-26 20:53:23.000000000 +0200
@@ -1503,7 +1503,7 @@ main()
 
         url = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("A-b.3:/%2f?x#y"));
         urlobj = INetURLObject(url);
-        bSuccess &= assertEqual(url, INET_PROT_GENERIC, urlobj.GetProtocol());
+        bSuccess &= assertEqual(url, INET_PROT_GENERIC_HIERARCHICAL, urlobj.GetProtocol());
         bSuccess &= assertEqual(
             url, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("a-b.3:/%2F?x#y")),
             rtl::OUString(urlobj.GetMainURL(INetURLObject::NO_DECODE)));
@@ -1531,7 +1531,7 @@ main()
 
         url = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("foo:/"));
         urlobj = INetURLObject(url);
-        bSuccess &= assertEqual(url, INET_PROT_GENERIC, urlobj.GetProtocol());
+        bSuccess &= assertEqual(url, INET_PROT_GENERIC_HIERARCHICAL, urlobj.GetProtocol());
         bSuccess &= assertEqual(
             url, url,
             rtl::OUString(urlobj.GetMainURL(INetURLObject::NO_DECODE)));
@@ -1569,7 +1569,7 @@ main()
 
         url = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("A-b.3:/%2f?x#y"));
         urlobj = INetURLObject(url, INET_PROT_CID);
-        bSuccess &= assertEqual(url, INET_PROT_GENERIC, urlobj.GetProtocol());
+        bSuccess &= assertEqual(url, INET_PROT_GENERIC_HIERARCHICAL, urlobj.GetProtocol());
         bSuccess &= assertEqual(
             url, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("a-b.3:/%2F?x#y")),
             rtl::OUString(urlobj.GetMainURL(INetURLObject::NO_DECODE)));
@@ -1590,7 +1590,7 @@ main()
 
         url = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("foo:/"));
         urlobj = INetURLObject(url, INET_PROT_CID);
-        bSuccess &= assertEqual(url, INET_PROT_GENERIC, urlobj.GetProtocol());
+        bSuccess &= assertEqual(url, INET_PROT_GENERIC_HIERARCHICAL, urlobj.GetProtocol());
         bSuccess &= assertEqual(
             url, url,
             rtl::OUString(urlobj.GetMainURL(INetURLObject::NO_DECODE)));
