Update to permit use of XHTML expander outside of mod-lisp.
authorChris Hanson <org/chris-hanson/cph>
Mon, 1 Nov 2004 04:57:05 +0000 (04:57 +0000)
committerChris Hanson <org/chris-hanson/cph>
Mon, 1 Nov 2004 04:57:05 +0000 (04:57 +0000)
v7/src/ssp/mod-lisp.scm
v7/src/ssp/ssp.pkg
v7/src/ssp/xhtml-expander.scm

index c0797734e279f066c60031e19d5953557de778e3..eba70086a415ce896017648cb7a5de4e2da15a12 100644 (file)
@@ -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*)
index 148656bb30f3e08218f99606989709f673e1ebe8..585f2178424b366c4bb8e63983bd61aadace4b4a 100644 (file)
@@ -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
index 84b49a984da2c7c3a26839e8d5884ef56802607f..2cd7c37401cda6073635d3b4ba400e637edcdb4b 100644 (file)
@@ -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))))