Browse Source

Silenced the annoying "request timed out" warning, enable with the "debug.log-timeouts" option (fixes #1529)

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2390 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.21
Stefan Bühler 13 years ago
parent
commit
22bee5ad52
  1. 1
      NEWS
  2. 1
      src/base.h
  3. 10
      src/configfile.c
  4. 6
      src/server.c

1
NEWS

@ -35,6 +35,7 @@ NEWS
* Use modified etags in mod_compress (fixes #1800)
* Fix max-connection limit handling/100% cpu usage (fixes #1436)
* Fix error handling in freebsd-sendfile (fixes #1813)
* Silenced the annoying "request timed out" warning, enable with the "debug.log-timeouts" option (fixes #1529)
- 1.4.20 - 2008-09-30

1
src/base.h

@ -260,6 +260,7 @@ typedef struct {
unsigned short log_response_header;
unsigned short log_condition_handling;
unsigned short log_ssl_noise;
unsigned short log_timeouts;
/* server wide */

10
src/configfile.c

@ -91,10 +91,11 @@ static int config_insert(server *srv) {
{ "server.core-files", NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_CONNECTION }, /* 46 */
{ "ssl.cipher-list", NULL, T_CONFIG_STRING, T_CONFIG_SCOPE_SERVER }, /* 47 */
{ "ssl.use-sslv2", NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_CONNECTION }, /* 48 */
{ "etag.use-inode", NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_SERVER }, /* 49 */
{ "etag.use-mtime", NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_SERVER }, /* 50 */
{ "etag.use-size", NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_SERVER }, /* 51 */
{ "etag.use-inode", NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_SERVER }, /* 49 */
{ "etag.use-mtime", NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_SERVER }, /* 50 */
{ "etag.use-size", NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_SERVER }, /* 51 */
{ "server.reject-expect-100-with-417", NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_SERVER }, /* 52 */
{ "debug.log-timeouts", NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_CONNECTION }, /* 53 */
{ "server.host", "use server.bind instead", T_CONFIG_DEPRECATED, T_CONFIG_SCOPE_UNSET },
{ "server.docroot", "use server.document-root instead", T_CONFIG_DEPRECATED, T_CONFIG_SCOPE_UNSET },
{ "server.virtual-root", "load mod_simple_vhost and use simple-vhost.server-root instead", T_CONFIG_DEPRECATED, T_CONFIG_SCOPE_UNSET },
@ -209,6 +210,7 @@ static int config_insert(server *srv) {
cv[33].destination = &(s->log_response_header);
cv[34].destination = &(s->log_request_header);
cv[35].destination = &(s->log_ssl_noise);
cv[53].destination = &(s->log_timeouts);
cv[36].destination = &(s->allow_http11);
cv[39].destination = s->ssl_ca_file;
@ -376,6 +378,8 @@ int config_patch_connection(server *srv, connection *con, comp_key_t comp) {
PATCH(log_file_not_found);
} else if (buffer_is_equal_string(du->key, CONST_STR_LEN("debug.log-ssl-noise"))) {
PATCH(log_ssl_noise);
} else if (buffer_is_equal_string(du->key, CONST_STR_LEN("debug.log-timeouts"))) {
PATCH(log_timeouts);
} else if (buffer_is_equal_string(du->key, CONST_STR_LEN("server.protocol-http11"))) {
PATCH(allow_http11);
} else if (buffer_is_equal_string(du->key, CONST_STR_LEN("server.force-lowercase-filenames"))) {

6
src/server.c

@ -1245,8 +1245,8 @@ int main (int argc, char **argv) {
if (srv->cur_ts - con->write_request_ts > con->conf.max_write_idle) {
/* time - out */
#if 1
log_error_write(srv, __FILE__, __LINE__, "sbsosds",
if (con->conf.log_timeouts) {
log_error_write(srv, __FILE__, __LINE__, "sbsosds",
"NOTE: a request for",
con->request.uri,
"timed out after writing",
@ -1254,7 +1254,7 @@ int main (int argc, char **argv) {
"bytes. We waited",
(int)con->conf.max_write_idle,
"seconds. If this a problem increase server.max-write-idle");
#endif
}
connection_set_state(srv, con, CON_STATE_ERROR);
changed = 1;
}

Loading…
Cancel
Save