From: Jeff Trawick Date: Wed, 22 Oct 2003 16:45:53 +0000 (+0000) Subject: Set the scoreboard state to indicate logging prior to running X-Git-Tag: pre_ajp_proxy~1102 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0c3c5b714569418086bcccd869c67807b66b297e;p=thirdparty%2Fapache%2Fhttpd.git Set the scoreboard state to indicate logging prior to running logging hooks so that server-status will show 'L' for hung loggers instead of 'W'. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101517 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index f032e111316..1c46f6c18d0 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,10 @@ Changes with Apache 2.1.0-dev [Remove entries to the current 2.0 section below, when backported] + *) Set the scoreboard state to indicate logging prior to running + logging hooks so that server-status will show 'L' for hung loggers + instead of 'W'. [Jeff Trawick] + *) mod_include: fix segfault which occured if the filename was not set, for example, when processing some error conditions. PR 23836. [Brian Akins , André Malo] diff --git a/modules/http/http_request.c b/modules/http/http_request.c index ae01c260dea..fe59ebc0797 100644 --- a/modules/http/http_request.c +++ b/modules/http/http_request.c @@ -84,6 +84,7 @@ #include "http_main.h" #include "util_filter.h" #include "util_charset.h" +#include "scoreboard.h" #include "mod_core.h" @@ -309,6 +310,7 @@ void ap_process_request(request_rec *r) * it's the application that's stalled. */ check_pipeline_flush(r); + ap_update_child_status(r->connection->sbh, SERVER_BUSY_LOG, r); ap_run_log_transaction(r); } diff --git a/server/protocol.c b/server/protocol.c index 1222e84466c..8ca2cad39e2 100644 --- a/server/protocol.c +++ b/server/protocol.c @@ -90,6 +90,7 @@ #include "mod_core.h" #include "util_charset.h" #include "util_ebcdic.h" +#include "scoreboard.h" #if APR_HAVE_STDARG_H #include @@ -901,6 +902,7 @@ request_rec *ap_read_request(conn_rec *conn) ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "request failed: URI too long"); ap_send_error_response(r, 0); + ap_update_child_status(conn->sbh, SERVER_BUSY_LOG, r); ap_run_log_transaction(r); apr_brigade_destroy(tmp_bb); return r; @@ -916,6 +918,7 @@ request_rec *ap_read_request(conn_rec *conn) ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "request failed: error reading the headers"); ap_send_error_response(r, 0); + ap_update_child_status(conn->sbh, SERVER_BUSY_LOG, r); ap_run_log_transaction(r); apr_brigade_destroy(tmp_bb); return r; @@ -934,6 +937,7 @@ request_rec *ap_read_request(conn_rec *conn) r->header_only = 0; r->status = HTTP_BAD_REQUEST; ap_send_error_response(r, 0); + ap_update_child_status(conn->sbh, SERVER_BUSY_LOG, r); ap_run_log_transaction(r); apr_brigade_destroy(tmp_bb); return r; @@ -970,12 +974,14 @@ request_rec *ap_read_request(conn_rec *conn) if (r->status != HTTP_OK) { ap_send_error_response(r, 0); + ap_update_child_status(conn->sbh, SERVER_BUSY_LOG, r); ap_run_log_transaction(r); return r; } if ((access_status = ap_run_post_read_request(r))) { ap_die(access_status, r); + ap_update_child_status(conn->sbh, SERVER_BUSY_LOG, r); ap_run_log_transaction(r); return NULL; } @@ -997,6 +1003,7 @@ request_rec *ap_read_request(conn_rec *conn) "client sent an unrecognized expectation value of " "Expect: %s", expect); ap_send_error_response(r, 0); + ap_update_child_status(conn->sbh, SERVER_BUSY_LOG, r); ap_run_log_transaction(r); return r; }