summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cjr_print.sml4
-rw-r--r--src/errormsg.sml14
2 files changed, 10 insertions, 8 deletions
diff --git a/src/cjr_print.sml b/src/cjr_print.sml
index 0f1e7135..5c087fe0 100644
--- a/src/cjr_print.sml
+++ b/src/cjr_print.sml
@@ -3433,7 +3433,9 @@ fun p_file env (ds, ps) =
newline,
string "uw_clear_headers(ctx);",
newline,
- string "uw_write_header(ctx, \"HTTP/1.1 404 Not Found\\r\\nContent-type: text/plain\\r\\n\");",
+ string "uw_write_header(ctx, uw_supports_direct_status ? \"HTTP/1.1 404 Not Found\\r\\n\" : \"Status: 404 Not Found\\r\\n\");",
+ newline,
+ string "uw_write_header(ctx, \"Content-type: text/plain\\r\\n\");",
newline,
string "uw_write(ctx, \"Not Found\");",
newline,
diff --git a/src/errormsg.sml b/src/errormsg.sml
index f9ed71e8..8f3c93b1 100644
--- a/src/errormsg.sml
+++ b/src/errormsg.sml
@@ -95,13 +95,13 @@ fun error s = (TextIO.output (TextIO.stdErr, s);
TextIO.output1 (TextIO.stdErr, #"\n");
errors := true)
-fun errorAt span s = (TextIO.output (TextIO.stdErr, #file span);
- TextIO.output (TextIO.stdErr, ":");
- TextIO.output (TextIO.stdErr, posToString (#first span));
- TextIO.output (TextIO.stdErr, ": (to ");
- TextIO.output (TextIO.stdErr, posToString (#last span));
- TextIO.output (TextIO.stdErr, ") ");
- error s)
+fun errorAt (span : span) s = (TextIO.output (TextIO.stdErr, #file span);
+ TextIO.output (TextIO.stdErr, ":");
+ TextIO.output (TextIO.stdErr, posToString (#first span));
+ TextIO.output (TextIO.stdErr, ": (to ");
+ TextIO.output (TextIO.stdErr, posToString (#last span));
+ TextIO.output (TextIO.stdErr, ") ");
+ error s)
fun errorAt' span s = errorAt (spanOf span) s
end