From: John Benediktsson Date: Thu, 28 Jul 2022 16:58:32 +0000 (-0700) Subject: http.server.cgi: normalize cgi path X-Git-Tag: 0.99~1318 X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=commitdiff_plain;h=85c7bb51bea30687fb972de65994ce0166c1e32f http.server.cgi: normalize cgi path --- diff --git a/basis/http/server/cgi/cgi.factor b/basis/http/server/cgi/cgi.factor index 84459b747f..d9f7cff87a 100644 --- a/basis/http/server/cgi/cgi.factor +++ b/basis/http/server/cgi/cgi.factor @@ -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 _ binary [ + output-stream get _ normalize-path binary [ post-request? [ request get post-data>> data>> write flush ] when '[ _ stream-write ] each-block ] with-stream