]> gitweb.factorcode.org Git - factor.git/commitdiff
gopher: make default selector the menu.
authorJohn Benediktsson <mrjbq7@gmail.com>
Wed, 17 Dec 2014 22:30:31 +0000 (14:30 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Wed, 17 Dec 2014 22:30:31 +0000 (14:30 -0800)
extra/gopher/gopher.factor

index c5dec8b18e1376de49c4b932e144141806c1c91f..feb609efd8df19e01b02dca14e7529c6ae1b1c71 100644 (file)
@@ -93,8 +93,8 @@ ERROR: not-a-gopher-url url ;
     dup protocol>> "gopher" = [ not-a-gopher-url ] unless {
         [ host>> ]
         [ port>> 70 or <inet> binary ]
-        [ path>> rest ]
-        [ query>> assoc>query url-decode "?" glue ]
+        [ path>> rest [ "1/" ] when-empty ]
+        [ query>> [ assoc>query url-decode "?" glue ] when* ]
     } cleave '[ _ get-selector ] with-client ;
 
 : gopher. ( url -- )