Mercurial > urweb
comparison 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 |
comparison
equal
deleted
inserted
replaced
1934:420d129c4174 | 1935:fda9d5af69e7 |
---|---|
3070 box (case ek of | 3070 box (case ek of |
3071 Core.Rpc _ => [string "uw_write_header(ctx, \"Content-type: text/plain\\r\\n\");", | 3071 Core.Rpc _ => [string "uw_write_header(ctx, \"Content-type: text/plain\\r\\n\");", |
3072 newline] | 3072 newline] |
3073 | _ => [string "uw_write_header(ctx, \"Content-type: text/html; charset=utf-8\\r\\n\");", | 3073 | _ => [string "uw_write_header(ctx, \"Content-type: text/html; charset=utf-8\\r\\n\");", |
3074 newline, | 3074 newline, |
3075 string "uw_write_header(ctx, \"Content-script-type: text/javascript\\r\\n\");", | 3075 case side of |
3076 newline, | 3076 ServerOnly => box [] |
3077 | _ => box [string "uw_write_header(ctx, \"Content-script-type: text/javascript\\r\\n\");", | |
3078 newline], | |
3077 string "uw_write(ctx, begin_xhtml);", | 3079 string "uw_write(ctx, begin_xhtml);", |
3078 newline, | 3080 newline, |
3079 string "uw_mayReturnIndirectly(ctx);", | 3081 string "uw_mayReturnIndirectly(ctx);", |
3080 newline, | 3082 newline, |
3081 string "uw_set_script_header(ctx, \"", | 3083 string "uw_set_script_header(ctx, \"", |