Mercurial > urweb
changeset 1408:56ba9c442a2d
Use sigFile again; do redirects in a way that is compatible with FastCGI
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Thu, 20 Jan 2011 16:26:54 -0500 (2011-01-20) |
parents | 7d963b8019e6 |
children | 6ab04cb0e4db |
files | src/c/urweb.c src/compiler.sml |
diffstat | 2 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/c/urweb.c Thu Jan 20 15:11:45 2011 -0500 +++ b/src/c/urweb.c Thu Jan 20 16:26:54 2011 -0500 @@ -241,7 +241,6 @@ } static char *on_success = "HTTP/1.1 200 OK\r\n"; -static char *on_redirect = "HTTP/1.1 303 See Other\r\n"; void uw_set_on_success(char *s) { on_success = s; @@ -3404,7 +3403,7 @@ ctx->page.start[uw_buffer_used(&ctx->outHeaders)] = 0; uw_buffer_reset(&ctx->outHeaders); - uw_write_header(ctx, on_redirect); + uw_write_header(ctx, on_success); s = strchr(ctx->page.start, '\n'); if (s) { @@ -3742,7 +3741,7 @@ if (ctx->app->db_begin(ctx)) uw_error(ctx, BOUNDED_RETRY, "Error running SQL BEGIN"); - uw_write_header(ctx, "HTTP/1.1 500 Internal Server Error\r\n"); + uw_write_header(ctx, "Status: 500 Internal Server Error\r\n"); uw_write_header(ctx, "Content-type: text/html\r\n\r\n"); uw_write(ctx, begin_xhtml); ctx->app->on_error(ctx, msg);
--- a/src/compiler.sml Thu Jan 20 15:11:45 2011 -0500 +++ b/src/compiler.sml Thu Jan 20 16:26:54 2011 -0500 @@ -337,7 +337,8 @@ Option.app Settings.setDbms (#dbms job); Settings.setSafeGets (#safeGets job); Settings.setOnError (#onError job); - Settings.setMinHeap (#minHeap job)) + Settings.setMinHeap (#minHeap job); + Settings.setSigFile (#sigFile job)) fun inputCommentableLine inf = Option.map (fn s =>