diff src/cjr_print.sml @ 1110:7fc4e0087e50

Proper 404 generation
author Adam Chlipala <adamc@hcoop.net>
date Sat, 02 Jan 2010 13:31:59 -0500
parents 631a3597c065
children e1d738870086
line wrap: on
line diff
--- a/src/cjr_print.sml	Fri Jan 01 12:48:06 2010 -0500
+++ b/src/cjr_print.sml	Sat Jan 02 13:31:59 2010 -0500
@@ -2833,7 +2833,11 @@
              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,