]> gitweb.factorcode.org Git - factor.git/commitdiff
Revert "urls: RFC 3986 (5.2.4. Remove Dot Segments)"
authorJohn Benediktsson <mrjbq7@gmail.com>
Fri, 12 Mar 2021 20:32:20 +0000 (12:32 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Fri, 12 Mar 2021 20:32:20 +0000 (12:32 -0800)
This reverts commit fa01104da7406efe923181921bbcdddc38f9a55c.

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