summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-12-07 11:19:13 -0500
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-12-07 11:19:13 -0500
commita63d958e6836e1240d27fdbf64cb7cd2bbee65cf (patch)
treee231dbfa3b6527c7b1c70c1599f9c5e2d1fa496c
parentfe138022197bc0dede592fc1df97e1ef540c1b6a (diff)
Treat user-provided error messages as XML
-rw-r--r--src/c/driver.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/c/driver.c b/src/c/driver.c
index a9a5ce3f..df154aea 100644
--- a/src/c/driver.c
+++ b/src/c/driver.c
@@ -255,10 +255,11 @@ static void *worker(void *data) {
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);