]> gitweb.factorcode.org Git - factor.git/commitdiff
images.http: allow urls to be used with http-image.
authorJohn Benediktsson <mrjbq7@gmail.com>
Fri, 28 Jan 2011 04:00:42 +0000 (20:00 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Fri, 28 Jan 2011 04:00:42 +0000 (20:00 -0800)
extra/images/http/http.factor

index 217c8408d1028ff2f2e7aec035c42e80d111abdb..a4c064619c93d179c750996fac3cc060866318ad 100644 (file)
@@ -2,7 +2,7 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors assocs http.client images.loader
 images.loader.private images.viewer io.pathnames kernel
-namespaces sequences ;
+namespaces present sequences ;
 IN: images.http
 
 <PRIVATE
@@ -14,7 +14,8 @@ IN: images.http
 PRIVATE>
 
 : load-http-image ( path -- image )
-    [ http-get swap content-type ] [ file-extension ] bi or
+    [ http-get swap content-type ]
+    [ present file-extension ] bi or
     (image-class) load-image* ;
 
 : http-image. ( path -- )