diff options
author | Eric Covener <covener@apache.org> | 2015-09-24 18:29:00 +0200 |
---|---|---|
committer | Eric Covener <covener@apache.org> | 2015-09-24 18:29:00 +0200 |
commit | 985e7072650183a12c56e567081a40c39792b5db (patch) | |
tree | e0a159ce3bab190a55bb0f9de4697e47aebea824 /modules/loggers | |
parent | adding --enable-http2 as preferred config option (diff) | |
download | apache2-985e7072650183a12c56e567081a40c39792b5db.tar.xz apache2-985e7072650183a12c56e567081a40c39792b5db.zip |
Don't count initial handshake I/O when determining the first byte.
PR58454
Submitted By: Konstantin J. Chernov
Committed By: covener
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1705099 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/loggers')
-rw-r--r-- | modules/loggers/mod_logio.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/modules/loggers/mod_logio.c b/modules/loggers/mod_logio.c index ab922e30c6..e4473cb9c7 100644 --- a/modules/loggers/mod_logio.c +++ b/modules/loggers/mod_logio.c @@ -65,16 +65,14 @@ static void ap_logio_add_bytes_out(conn_rec *c, apr_off_t bytes) logio_config_t *cf = ap_get_module_config(c->conn_config, &logio_module); cf->bytes_out += bytes; - if (!cf->first_byte_seen) { - /* cleared during log_transaction, after mod_log_config */ + /* writes for handshake i/o, before cf->r is set in post_read_request, don't count */ + if (cf->r && !cf->first_byte_seen) { + /* cleared during log_transaction with cf->r, after mod_log_config */ + logio_dirconf_t *conf = (logio_dirconf_t*) + ap_get_module_config(cf->r->per_dir_config, &logio_module); cf->first_byte_seen = 1; - - if (cf->r) { - logio_dirconf_t *conf = (logio_dirconf_t*) - ap_get_module_config(cf->r->per_dir_config, &logio_module); - if (conf && conf->track_ttfb) { - cf->ttfb = apr_time_now() - cf->r->request_time; - } + if (conf && conf->track_ttfb) { + cf->ttfb = apr_time_now() - cf->r->request_time; } } } |