Re: How to simple exit in CGI?

Jean Louis <[email protected]> Tue, 28 Mar 2017 19:48:53 +0300
Newsgroups gmane.lisp.clisp.general
Message-ID <[email protected]>
This is how the output looks like in browser:
https://rcdrun.com/files/tmp/2017-03-28-19:41:14.jpg

>From this snippet below, when saved as executable memory image with
init function 'main, and when called without arguments (POST/GET).

(setf custom:*ansi* t)
(defun main nil 
  (let ((url "http://localhost")
        (query (or (getenv "QUERY_STRING")
                   (alexandria.0.dev:read-stream-content-into-string *standard-input*))))
    (format t "Status: 302 Found~%Location: ~a~%~%" url)
    (finish-output)
    (exit 0)))  
;; (main)


Jean

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
clisp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/clisp-list