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 [EMAIL PROTECTED] +1.734.476.0969
_______________________________________________ Bug-guile mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-guile
