summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/urweb.h2
-rw-r--r--src/c/cgi.c2
-rw-r--r--src/c/fastcgi.c2
-rw-r--r--src/c/http.c2
-rw-r--r--src/c/request.c2
-rw-r--r--src/cjr_print.sml2
6 files changed, 10 insertions, 2 deletions
diff --git a/include/urweb.h b/include/urweb.h
index e9e330b8..4816537a 100644
--- a/include/urweb.h
+++ b/include/urweb.h
@@ -286,4 +286,6 @@ uw_Basis_int uw_Basis_rand(uw_context);
extern int uw_time_max;
+extern int uw_supports_direct_status;
+
#endif
diff --git a/src/c/cgi.c b/src/c/cgi.c
index fe7dc564..50d64f58 100644
--- a/src/c/cgi.c
+++ b/src/c/cgi.c
@@ -137,3 +137,5 @@ void uw_do_expunge(uw_context ctx, uw_Basis_client cli, void *data) {
void uw_post_expunge(uw_context ctx, void *data) {
}
+
+int uw_supports_direct_status = 1;
diff --git a/src/c/fastcgi.c b/src/c/fastcgi.c
index 4e20cc01..756ed3b0 100644
--- a/src/c/fastcgi.c
+++ b/src/c/fastcgi.c
@@ -618,3 +618,5 @@ void uw_do_expunge(uw_context ctx, uw_Basis_client cli, void *data) {
void uw_post_expunge(uw_context ctx, void *data) {
}
+
+int uw_supports_direct_status = 0;
diff --git a/src/c/http.c b/src/c/http.c
index 5754d229..d52661ce 100644
--- a/src/c/http.c
+++ b/src/c/http.c
@@ -358,3 +358,5 @@ void uw_do_expunge(uw_context ctx, uw_Basis_client cli, void *data) {
void uw_post_expunge(uw_context ctx, void *data) {
}
+
+int uw_supports_direct_status = 1;
diff --git a/src/c/request.c b/src/c/request.c
index 190a327f..52006e85 100644
--- a/src/c/request.c
+++ b/src/c/request.c
@@ -211,7 +211,7 @@ request_result uw_request(uw_request_context rc, uw_context ctx,
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 --git a/src/cjr_print.sml b/src/cjr_print.sml
index 29f94fe6..e440a53d 100644
--- a/src/cjr_print.sml
+++ b/src/cjr_print.sml
@@ -2924,7 +2924,7 @@ fun p_file env (ds, ps) =
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],