changeset 548:b3b06fef7bb5

Treat user-provided error messages as XML
author Adam Chlipala <adamc@hcoop.net>
date Sun, 07 Dec 2008 11:19:13 -0500
parents 8e615bb605c9
children 39282473d38f
files src/c/driver.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/c/driver.c	Sun Dec 07 10:59:14 2008 -0500
+++ b/src/c/driver.c	Sun Dec 07 11:19:13 2008 -0500
@@ -255,10 +255,11 @@
 
             uw_reset_keep_error_message(ctx);
             uw_write_header(ctx, "HTTP/1.1 500 Internal Server Error\r\n");
-            uw_write_header(ctx, "Content-type: text/plain\r\n");
+            uw_write_header(ctx, "Content-type: text/html\r\n");
+            uw_write(ctx, "<html><head><title>Fatal Error</title></head><body>");
             uw_write(ctx, "Fatal error: ");
             uw_write(ctx, uw_error_message(ctx));
-            uw_write(ctx, "\n");
+            uw_write(ctx, "\n</body></html>");
 
             try_rollback(ctx);