From: Eric Covener Date: Thu, 24 Sep 2015 16:29:00 +0000 (+0000) Subject: Don't count initial handshake I/O when determining the first byte. X-Git-Tag: 2.5.0-alpha~2813 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=985e7072650183a12c56e567081a40c39792b5db;p=thirdparty%2Fapache%2Fhttpd.git 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 --- diff --git a/CHANGES b/CHANGES index 3a77f52d266..e58b23d7798 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,10 @@ -*- coding: utf-8 -*- Changes with Apache 2.5.0 + *) mod_logio: Fix logging of %^FB (time to first byte) on the first request on + an SSL connection. PR 58454. + [Konstantin J. Chernov ] + *) mod_ssl: Support compilation against libssl built with OPENSSL_NO_SSL3, and change the compiled-in default for SSL[Proxy]Protocol to "all -SSLv3", in accordance with RFC 7568. PR 58349, PR 57120. [Kaspar Brand] diff --git a/modules/loggers/mod_logio.c b/modules/loggers/mod_logio.c index ab922e30c62..e4473cb9c79 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; } } }