Project

General

Profile

Actions

Feature #539

closed

have mod_status display network.backend

Added by conny about 19 years ago. Updated about 1 year ago.

Status:
Wontfix
Priority:
Normal
Category:
mod_status
Target version:
-
ASK QUESTIONS IN Forums:
No

Description

My /server-status already displays "Network Engine / fd-Event-Handler" (i.e. server.event-handler).

I could be useful to have it display the configured value of server.network-backend as well.

Actions #1

Updated by stbuehler over 16 years ago

  • Status changed from New to Fixed
  • Resolution set to wontfix

As only the callback pointers are saved in the server config it is not trivial to find the backend name.

Actions #2

Updated by stbuehler over 16 years ago

  • Status changed from Fixed to Wontfix
Actions #3

Updated by gstrauss about 1 year ago

  • Description updated (diff)
  • ASK QUESTIONS IN Forums set to No

While this is more feasible to do in modern lighttpd, the value is questionable. lighttpd uses "sendfile" on FILE_CHUNKs and "writev" on MEM_CHUNKs. If "sendfile" fails on FILE_CHUNKs (or is not available), then modern lighttpd falls back to read the file into memory and use "writev". In older lighttpd versions, without the fallback, knowing the server.network-backend setting would have been more useful.

--- a/src/mod_status.c
+++ b/src/mod_status.c
@@ -772,6 +772,12 @@ static handler_t mod_status_handle_server_config(request_st * const r) {
                                  srv->srvconf.event_handler,
                                  strlen(srv->srvconf.event_handler));

+       const char *network_backend = srv->srvconf.network_backend
+         ? srv->srvconf.network_backend->ptr
+         : "sendfile";
+       mod_status_row_append(b, CONST_STR_LEN("Network Backend"),
+                                 network_backend, strlen(network_backend));
+
        mod_status_header_append(b, CONST_STR_LEN("Config-File-Settings"));

        mod_status_row_append(b, CONST_STR_LEN("Loaded Modules"), BUF_PTR_LEN(tb));
Actions

Also available in: Atom