[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
guile-www-2.9 (www cgi) does not support mod-lisp/fastcgi style uses
From: |
Alan Grover |
Subject: |
guile-www-2.9 (www cgi) does not support mod-lisp/fastcgi style uses |
Date: |
Mon, 11 Apr 2005 19:44:37 -0400 |
User-agent: |
Mozilla Thunderbird 0.7 (X11/20040615) |
guile-www-2.9 (www cgi) captures the CGI Environment once. If the
containing process is called to serve a subsequent request, the values
will usually be wrong. The current implementation is not friendly to
mod-lisp/fastcgi uses (or testing!).
Module: www cgi
Version: 2.9
The *env-alist* constructs an alist at module-load time, composed of
delayed "getenv" calls. Thus, while the values are not captured at
module-load time, they are memoized the first time they are accessed.
"The value of the promise is cached (or "memoized") so that if it is
forced a second time, the previously computed value is returned" [r5rs,
Control Features]. I could find no mechanism to un-memoize.
Note that this may lead to different CGI values being captured during
different requests. For example, the first request may capture the URI,
the next request may capture its PATH-INFO, and so on.
I don't know the behavior of promises in threads, so I do not know if
the module will misbehave in a threaded-server model.
There may be other values that are not re-initialized by "init", I have
not attempted to be comprehensive.
A suggest patch that resets the promises at "init" time is:
cgi.scm
43c43,45
< (define *env-alist*
---
> (define *env-alist* #f)
> (define (make-env-alist)
> (set! *env-alist*
98c100
< #\, types)))))))))
---
> #\, types))))))))))
117a120
> (make-env-alist)
> (set! form-variables '())
I'm working on a suggested change to (www cgi) that will include this
patch. It should be available within the next 2 days.
--
Alan Grover
address@hidden
+1.734.476.0969
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- guile-www-2.9 (www cgi) does not support mod-lisp/fastcgi style uses,
Alan Grover <=