File: fcgi-demo.l

package info (click to toggle)
euslisp 9.27%2Bdfsg-7
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 55,344 kB
  • sloc: ansic: 41,162; lisp: 3,339; makefile: 256; sh: 208; asm: 138; python: 53
file content (20 lines) | stat: -rw-r--r-- 698 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
(load "/usr/local/eus/lib/llib/httpfcgi.l")
(defvar *count* 0)
(fcgi-loop
   (setq cookie (get-cookie))
   (setq newcookie
	 (make-cookie 'eus-fcgi-demo (random-cookie)
			:domain "matsui.jpn.ph"
			:expires (* 5 24 3600)))
   (if (null cookie)
       (http-header :cookie (list newcookie))
	(http-header))
   (html-header)
   (incf *count*)
   ;; (format *error-output* "fcgi-eus connection accepted~%")
   ;; (finish-output *error-output*)
   (format *standard-output* "~%<body><h1>Hello World ~d</h1>~%<pre>~%" *count*)
   (gen "cookie=~s~%newcookie=~s~%~%" cookie newcookie)
   (dolist (ue (unix:environ))  (gen "    ~a<br>" ue))
   (format *standard-output* "<h2>Good-bye</h2></body>~%")
   )