# HG changeset patch # User Adam Chlipala # Date 1290264483 18000 # Node ID add5ae41969e2a81b9235e3cb82700ba5240d0b7 # Parent c17e6144510b498349bec08a8cf4382aa6aa3a2c In FastCGI, signal 304 with a header, not the usual HTTP/1.1 line diff -r c17e6144510b -r add5ae41969e include/urweb.h --- a/include/urweb.h Fri Nov 19 17:06:11 2010 -0500 +++ b/include/urweb.h Sat Nov 20 09:48:03 2010 -0500 @@ -286,4 +286,6 @@ extern int uw_time_max; +extern int uw_supports_direct_status; + #endif diff -r c17e6144510b -r add5ae41969e src/c/cgi.c --- a/src/c/cgi.c Fri Nov 19 17:06:11 2010 -0500 +++ b/src/c/cgi.c Sat Nov 20 09:48:03 2010 -0500 @@ -137,3 +137,5 @@ void uw_post_expunge(uw_context ctx, void *data) { } + +int uw_supports_direct_status = 1; diff -r c17e6144510b -r add5ae41969e src/c/fastcgi.c --- a/src/c/fastcgi.c Fri Nov 19 17:06:11 2010 -0500 +++ b/src/c/fastcgi.c Sat Nov 20 09:48:03 2010 -0500 @@ -618,3 +618,5 @@ void uw_post_expunge(uw_context ctx, void *data) { } + +int uw_supports_direct_status = 0; diff -r c17e6144510b -r add5ae41969e src/c/http.c --- a/src/c/http.c Fri Nov 19 17:06:11 2010 -0500 +++ b/src/c/http.c Sat Nov 20 09:48:03 2010 -0500 @@ -358,3 +358,5 @@ void uw_post_expunge(uw_context ctx, void *data) { } + +int uw_supports_direct_status = 1; diff -r c17e6144510b -r add5ae41969e src/c/request.c --- a/src/c/request.c Fri Nov 19 17:06:11 2010 -0500 +++ b/src/c/request.c Sat Nov 20 09:48:03 2010 -0500 @@ -211,7 +211,7 @@ if (id && pass) { unsigned idn = atoi(id); uw_client_connect(idn, atoi(pass), sock, send, close, logger_data, log_error); - log_error(logger_data, "Processed request for messages by client %u\n\n", idn); + log_debug(logger_data, "Processed request for messages by client %u\n\n", idn); return KEEP_OPEN; } else { diff -r c17e6144510b -r add5ae41969e src/cjr_print.sml --- a/src/cjr_print.sml Fri Nov 19 17:06:11 2010 -0500 +++ b/src/cjr_print.sml Sat Nov 20 09:48:03 2010 -0500 @@ -2924,7 +2924,7 @@ newline, box [string "uw_clear_headers(ctx);", newline, - string "uw_write_header(ctx, \"HTTP/1.1 304 Not Modified\\r\\n\");", + string "uw_write_header(ctx, uw_supports_direct_status ? \"HTTP/1.1 304 Not Modified\\r\\n\" : \"Status: 304 Not Modified\\r\\n\");", newline, string "return;", newline],