[mod_status] Print response status codes summary when plain format requested

personal/stbuehler/wip
Thomas Porzelt 13 years ago
parent 000bb1a2e1
commit 5f310af7c0
  1. 11
      src/modules/mod_status.c

@ -856,6 +856,17 @@ static GString *status_info_plain(liVRequest *vr, guint uptime, liStatistics *to
li_string_append_int(html, connection_count[5]);
g_string_append_len(html, CONST_STR_LEN("\nconnection_state_keep_alive: "));
li_string_append_int(html, connection_count[1]);
/* status cpdes */
g_string_append_len(html, CONST_STR_LEN("\n\n# Status Codes (since start)\n1xx: "));
li_string_append_int(html, mod_status_response_codes[0]);
g_string_append_len(html, CONST_STR_LEN("\n2xx: "));
li_string_append_int(html, mod_status_response_codes[1]);
g_string_append_len(html, CONST_STR_LEN("\n3xx: "));
li_string_append_int(html, mod_status_response_codes[2]);
g_string_append_len(html, CONST_STR_LEN("\n4xx: "));
li_string_append_int(html, mod_status_response_codes[3]);
g_string_append_len(html, CONST_STR_LEN("\n5xx: "));
li_string_append_int(html, mod_status_response_codes[4]);
li_http_header_overwrite(vr->response.headers, CONST_STR_LEN("Content-Type"), CONST_STR_LEN("text/plain"));

Loading…
Cancel
Save