summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2011-01-20 16:26:54 -0500
committerGravatar Adam Chlipala <adam@chlipala.net>2011-01-20 16:26:54 -0500
commit75c919438d4ff7a5a47267b585c78e08b7409594 (patch)
treeae6ea26b15d334a7ad75f0e507d94cf0048551fc
parent5e551876d67ac610c2a392acc2417e623002a51e (diff)
Use sigFile again; do redirects in a way that is compatible with FastCGI
-rw-r--r--src/c/urweb.c5
-rw-r--r--src/compiler.sml3
2 files changed, 4 insertions, 4 deletions
diff --git a/src/c/urweb.c b/src/c/urweb.c
index 12934509..456daf1c 100644
--- a/src/c/urweb.c
+++ b/src/c/urweb.c
@@ -241,7 +241,6 @@ static client *find_client(unsigned id) {
}
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 @@ __attribute__((noreturn)) void uw_redirect(uw_context ctx, uw_Basis_string url)
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 @@ failure_kind uw_begin_onError(uw_context ctx, char *msg) {
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);
diff --git a/src/compiler.sml b/src/compiler.sml
index e13042af..ed76fa8c 100644
--- a/src/compiler.sml
+++ b/src/compiler.sml
@@ -337,7 +337,8 @@ fun institutionalizeJob (job : job) =
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 =>