From: Chris Hanson Date: Mon, 1 Nov 2004 04:57:05 +0000 (+0000) Subject: Update to permit use of XHTML expander outside of mod-lisp. X-Git-Tag: 20090517-FFI~1490 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=003fbf088ac567f2c8490c60ef2123e59e4e3d2e;p=mit-scheme.git Update to permit use of XHTML expander outside of mod-lisp. --- diff --git a/v7/src/ssp/mod-lisp.scm b/v7/src/ssp/mod-lisp.scm index c0797734e..eba70086a 100644 --- a/v7/src/ssp/mod-lisp.scm +++ b/v7/src/ssp/mod-lisp.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: mod-lisp.scm,v 1.8 2004/10/31 00:01:26 cph Exp $ +$Id: mod-lisp.scm,v 1.9 2004/11/01 04:56:51 cph Exp $ Copyright 2003,2004 Massachusetts Institute of Technology @@ -291,7 +291,8 @@ USA. (run-hooks-in-list mod-lisp-before-expander-hooks request) (call-with-output-string (lambda (port) - (fluid-let ((*current-request* request) + (fluid-let ((*in-mod-lisp?* #t) + (*current-request* request) (*current-response* response) (*current-pathname* pathname) (expander-eval @@ -305,6 +306,9 @@ USA. (define mod-lisp-before-expander-hooks (make-hook-list)) (define mod-lisp-after-expander-hooks (make-hook-list)) +(define (in-mod-lisp?) *in-mod-lisp?*) + +(define *in-mod-lisp?* #f) (define *current-request*) (define *current-response*) (define *current-pathname*) diff --git a/v7/src/ssp/ssp.pkg b/v7/src/ssp/ssp.pkg index 148656bb3..585f21784 100644 --- a/v7/src/ssp/ssp.pkg +++ b/v7/src/ssp/ssp.pkg @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: ssp.pkg,v 1.10 2004/10/30 05:28:20 cph Exp $ +$Id: ssp.pkg,v 1.11 2004/11/01 04:56:58 cph Exp $ Copyright 2003,2004 Massachusetts Institute of Technology @@ -68,6 +68,7 @@ USA. http-request-user-name http-response-header http-status-response + in-mod-lisp? mod-lisp-expander server-root-dir start-logging-requests diff --git a/v7/src/ssp/xhtml-expander.scm b/v7/src/ssp/xhtml-expander.scm index 84b49a984..2cd7c3740 100644 --- a/v7/src/ssp/xhtml-expander.scm +++ b/v7/src/ssp/xhtml-expander.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: xhtml-expander.scm,v 1.3 2004/10/27 20:04:15 cph Exp $ +$Id: xhtml-expander.scm,v 1.4 2004/11/01 04:57:05 cph Exp $ Copyright 2002,2003,2004 Massachusetts Institute of Technology @@ -32,7 +32,8 @@ USA. (expand-xhtml-file pathname port))) (define (expand-xhtml-file pathname port) - (http-response-header 'content-type (html-content-type)) + (if (in-mod-lisp?) + (http-response-header 'content-type (html-content-type))) (let ((document (read/expand-xml-file pathname (make-expansion-environment pathname))))