-- Takes server file path from the file parameter and sends -- that to the client. -- WARNING: this script is a SECURITY RISK and only for -- demo purposes. Do not put it on a public web server. import Network.FastCGI form = concat ["
", "
", "", "
"] sendFile f = do setHeader "Content-type" "application/octet-stream" outputFile f cgiMain = getInput "file" >>= maybe (output form) sendFile main = runFastCGI cgiMain