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
commit547adaccb0b29cc02ff89013f84ae6446665144d (patch)
tree8003213999cf3e6ad98db16c29cd135654599d1a /src/cjr_print.sml
parent869bd80eacff24151b92e496ee6b0cade56d9e59 (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,