:super pathname
:slots server port protocol
escape-url url &optional (ss *standard-output*) (queryp t) [function]
escaped-url-string-from-namestring url-string &optional (queryp t) [function]
unescape-url url &optional (ss *standard-output*) (queryp t) [function]
unescaped-url-string-from-namestring url-string &optional (queryp t) [function]
read-http url &key (timeout 10) (retry 5) [function]
<body bgcolor=#ffa080> <h1> EusLisp Title</h1> <li> item1 </li> <a href="http://www.etl.go.jp/~matsui/eus/euslisp.html"> euslisp</a> </body>
("HTTP/1.1 200 OK" "Date: Sun, 21 May 2000 11:47:00 GMT" "Server: Apache/1.3.9 (Unix)" "Last-Modified: Sun, 21 May 2000 11:19:35 GMT" "ETag: \"4f014-c7-3927c647\"" "Accept-Ranges: bytes" "Content-Length: 199" "Content-Type: text/html" (head) (title) " Toshihiro Matsui on t570" (/title) (/head) (body bgcolor |#FFA080|) (h1) " Title Line" (/h1) (li) " item1 " (/li) (a href "http://www.etl.go.jp/~matsui/eus/euslisp.html") " euslisp" (/a) (/body))
extract-html tag html-list [function]
remove-html-tags html-list [function]
EusLisp can be used for CGI programming. The following is a typical cgi entry to a EusLisp program. This code piece should be placed under .../cgi-bin/ or under any directories where ExecCGI is allowed. The code piece must have execute permission by the `nobody' user. Note that CGI programs are executed by httpd whose owner is nobody. You also have to set up some environment variables in the code piece, for nobody does not know anything particular for EusLisp.
#! /bin/csh setenv EUSDIR /usr/local/eus/ setenv LD_LIBRARY_PATH /usr/local/eus/Linux/lib /usr/local/bin/eus /usr/local/eus/lib/demo/mycgi.l
mycgi.l is a lisp source program, which should load "$EUSDIR/lib/llib/httpcgi.l" at the beginning. The CGI program is responsible for obtaining CGI arguments, generating an html header, and producing html contents. The arguments are obtained by the get-cgi-query function, and split to a list by the parse-cgi-query function. The parsed list contains pairs of argument-name and argument-value. For example, if the CGI is invoked by href to "/cgi-bin/eus.cgi?user=matsui&age=43", the parsed list gives ((user matsui) (age 43)).
All normal CGI output should go to *cgi-out*. Before any html document, a header should be generated by the html-header function. If there is any error message written to *error-output*, it appears in the httpd's error-log. When the work is done and html document finishes by '</html> tag, the process may close the connection (*cgi-out*) and may exit. Normal exit of the CGI process usually signals the httpd to send the data to http clients.
*cgi-out* is the output stream to which the generated html document should be sent.
html-table lst &key heading (table-option "") [function]
parse-http-query query-string [function]
Whereas CGI is a convenient method to produce dynamic document on the server side, it is not the very best choice due to a performance reason: the cgi process must be spawned everytime a request arrives, and the process invocation time is not always negligible. In my measurement, the simplest CGI written in EusLisp needs 0.3 sec to respond. In this sense, EusLisp or any other programming system with rich runtime modules is not a very good choice for CGI writing.
Since this invocation load is a common problem for all CGI programs, there is a clever work around called Fast-CGI. The basic idea of the Fast-CGI is to allow CGI processes to keep alive even one CGI request is fulfilled. The httpd process communicates with a fast-cgi process via a TCP connection.
:super propertied-object
:slots cookie host
This document was generated using the LaTeX2HTML translator on Sat Feb 5 14:36:57 JST 2022 from EusLisp version 138fb6ee Merge pull request #482 from k-okada/apply_dfsg_patch