]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/http/http.factor
Fixing basis -> extra dependencies
[factor.git] / basis / http / http.factor
index 2a5a19036f64cb7b18969233770b4fa65cb09102..e450631d94595d26f7502a0827d26ba4fc2cced3 100755 (executable)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2003, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors kernel combinators math namespaces
-assocs assocs.lib sequences splitting sorting sets debugger
+assocs sequences splitting sorting sets debugger
 strings vectors hashtables quotations arrays byte-arrays
 math.parser calendar calendar.format present
 
@@ -27,9 +27,12 @@ IN: http
 : (read-header) ( -- alist )
     [ read-crlf dup f like ] [ parse-header-line ] [ drop ] produce ;
 
+: collect-headers ( assoc -- assoc' )
+    H{ } clone [ '[ , push-at ] assoc-each ] keep ;
+
 : process-header ( alist -- assoc )
     f swap [ [ swap or dup ] dip swap ] assoc-map nip
-    [ ?push ] histogram [ "; " join ] assoc-map
+    collect-headers [ "; " join ] assoc-map
     >hashtable ;
 
 : read-header ( -- assoc )