diff src/cjr_print.sml @ 1935:fda9d5af69e7

Only output Content-script-type header when there is client-side code
author Adam Chlipala <adam@chlipala.net>
date Thu, 12 Dec 2013 10:31:34 -0500
parents 98895243b5b6
children 6745eafff617
line wrap: on
line diff
--- a/src/cjr_print.sml	Thu Dec 12 10:24:38 2013 -0500
+++ b/src/cjr_print.sml	Thu Dec 12 10:31:34 2013 -0500
@@ -3072,8 +3072,10 @@
                                              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);",