]> gitweb.factorcode.org Git - factor.git/commitdiff
http.server.cgi: normalize cgi path
authorJohn Benediktsson <mrjbq7@gmail.com>
Thu, 28 Jul 2022 16:58:32 +0000 (09:58 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Thu, 28 Jul 2022 16:58:32 +0000 (09:58 -0700)
basis/http/server/cgi/cgi.factor

index 84459b747fe52e5e2044cf3f7d5ebd9113fb47b9..d9f7cff87a5f2a25d3b78a3690be35cd74d6edcc 100644 (file)
@@ -1,8 +1,9 @@
 ! Copyright (C) 2007, 2009 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors arrays assocs calendar http http.server io
-io.encodings io.encodings.binary io.launcher io.streams.duplex
-kernel make math.parser namespaces sequences urls urls.encoding ;
+io.backend io.encodings io.encodings.binary io.launcher
+io.streams.duplex kernel make math.parser namespaces sequences
+urls urls.encoding ;
 IN: http.server.cgi
 
 : cgi-variables ( script-path -- assoc )
@@ -52,7 +53,7 @@ IN: http.server.cgi
     "CGI output follows" >>message
     swap '[
         binary encode-output
-        output-stream get _ <cgi-process> binary <process-stream> [
+        output-stream get _ normalize-path <cgi-process> binary <process-stream> [
             post-request? [ request get post-data>> data>> write flush ] when
             '[ _ stream-write ] each-block
         ] with-stream