aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/cjr_print.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2013-12-12 10:31:34 -0500
committerGravatar Adam Chlipala <adam@chlipala.net>2013-12-12 10:31:34 -0500
commit106d1b7275e44cf419665e92b2682e009b51f095 (patch)
tree78116f57d7ba6df7d9b1abbe56d193c018904845 /src/cjr_print.sml
parentfdeb6edadce0a9da274449ac1450e871e183734b (diff)
Only output Content-script-type header when there is client-side code
Diffstat (limited to 'src/cjr_print.sml')
-rw-r--r--src/cjr_print.sml6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cjr_print.sml b/src/cjr_print.sml
index dec21eb3..798492d6 100644
--- a/src/cjr_print.sml
+++ b/src/cjr_print.sml
@@ -3072,8 +3072,10 @@ fun p_file env (ds, ps) =
newline]
| _ => [string "uw_write_header(ctx, \"Content-type: text/html; charset=utf-8\\r\\n\");",
newline,
- string "uw_write_header(ctx, \"Content-script-type: text/javascript\\r\\n\");",
- newline,
+ case side of
+ ServerOnly => box []
+ | _ => box [string "uw_write_header(ctx, \"Content-script-type: text/javascript\\r\\n\");",
+ newline],
string "uw_write(ctx, begin_xhtml);",
newline,
string "uw_mayReturnIndirectly(ctx);",