[mod_accesslog] report aborted con state with %X (fixes #1890)

(compatibility with Apache
 https://httpd.apache.org/docs/trunk/mod/mod_log_config.html)

x-ref:
  "%X in accesslog.format not working as expected"
  https://redmine.lighttpd.net/issues/1890
personal/stbuehler/mod-csrf-old
Glenn Strauss 7 years ago
parent 427acbf034
commit 45021708bf

@ -890,9 +890,14 @@ REQUESTDONE_FUNC(log_access_write) {
accesslog_append_escaped(b, con->uri.path_raw);
break;
case FORMAT_CONNECTION_STATUS:
switch(con->keep_alive) {
case 0: buffer_append_string_len(b, CONST_STR_LEN("-")); break;
default: buffer_append_string_len(b, CONST_STR_LEN("+")); break;
if (con->state == CON_STATE_RESPONSE_END) {
if (0 == con->keep_alive) {
buffer_append_string_len(b, CONST_STR_LEN("-"));
} else {
buffer_append_string_len(b, CONST_STR_LEN("+"));
}
} else { /* CON_STATE_ERROR */
buffer_append_string_len(b, CONST_STR_LEN("X"));
}
break;
default:

Loading…
Cancel
Save