]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/urls/urls.factor
Revert "urls: RFC 3986 (5.2.4. Remove Dot Segments)"
[factor.git] / basis / urls / urls.factor
index 64cc9d1e9067f231fbd81535656e92e5ed97a7ee..a0edf38a84cee17627c28b7831109497784273ef 100644 (file)
@@ -146,13 +146,6 @@ M: url present
         } cleave
     ] "" make ;
 
-: remove-dot-segments ( path -- path' )
-    "/" split "." swap remove [
-        { ".." } split1 [
-            [ [ { } ] [ but-last ] if-empty ] dip append t
-        ] [ f ] if*
-    ] loop "/" join [ f ] when-empty ;
-
 PRIVATE>
 
 : url-append-path ( path1 path2 -- path )
@@ -162,7 +155,7 @@ PRIVATE>
         { [ over "/" tail? ] [ append ] }
         { [ "/" pick subseq-start not ] [ nip ] }
         [ [ "/" split1-last drop "/" ] dip 3append ]
-    } cond remove-dot-segments ;
+    } cond ;
 
 <PRIVATE