summaryrefslogtreecommitdiff
path: root/src/cjr_print.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2010-01-02 13:31:59 -0500
committerGravatar Adam Chlipala <adamc@hcoop.net>2010-01-02 13:31:59 -0500
commitc8de04e4f81490bfde750375c55de2a260072e82 (patch)
tree8003213999cf3e6ad98db16c29cd135654599d1a /src/cjr_print.sml
parent96ab8b7ac77b4b13e1aaa9afe35834ff60a6759b (diff)
Proper 404 generation
Diffstat (limited to 'src/cjr_print.sml')
-rw-r--r--src/cjr_print.sml6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/cjr_print.sml b/src/cjr_print.sml
index 93f50de2..2cfd0663 100644
--- a/src/cjr_print.sml
+++ b/src/cjr_print.sml
@@ -2833,7 +2833,11 @@ fun p_file env (ds, ps) =
newline,
p_list_sep newline (fn x => x) pds',
newline,
- string "uw_error(ctx, FATAL, \"Unknown page\");",
+ string "uw_clear_headers(ctx);",
+ newline,
+ string "uw_write_header(ctx, \"HTTP/1.1 404 Not Found\\r\\nContent-type: text/plain\\r\\n\");",
+ newline,
+ string "uw_write(ctx, \"Not Found\");",
newline,
string "}",
newline,