httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 58454] New: Invalid FB (first byte) logging when using SSL/TLS
Date Thu, 24 Sep 2015 06:55:25 GMT
https://bz.apache.org/bugzilla/show_bug.cgi?id=58454

            Bug ID: 58454
           Summary: Invalid FB (first byte) logging when using SSL/TLS
           Product: Apache httpd-2
           Version: 2.4.16
          Hardware: Sun
                OS: Solaris
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_logio
          Assignee: bugs@httpd.apache.org
          Reporter: k.j.chernov@gmail.com

Created attachment 33139
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=33139&action=edit
Patch to make it work as suggested in the bug

While trying to adopt the mod_logio to our needs we found a bug (that may not
be a bug at all, but just a misunderstanding in the principles of how the
module works and what it counts): when the requests are being sent using
encrypted connection (SSL/TLS), the ^FB shows nothing (dash sign, "-") in the
log.

After a small research of the sources of mod_logio, I noticed a few things (the
sources was obtained from latest 2.4.16 tarball):
1. In the function ap_logio_add_bytes_out the time of the "request is fully
received" event "cf->r->request_time" is being used to determine the difference
between "request read" and "first response byte was sent to the client", which
turns out not to be correct, since the time "cf->r->request_time" is being set
when the first line of the request (like "POST / HTTP/1.1") was read by the
server.
2. The function ap_logio_add_bytes_out does not take into consideration that
the SSL/TLS handshake is not a response to the client's request, but a data
that preceeds the client's request. Hereby, it sets the cf->first_byte_seen to
1, even though the request was not read by that time.

Here's my understanding of how it should work:
1. When the logio_post_read_request being called, it should also set the TTFB
request time to current time (apr_time_now)
2. The function ap_logio_add_bytes_out should check that the request cf->r is
not null BEFORE looking into the cf->first_byte_seen

I think it is quite possible that I misunderstood the idea of ^FB logging, and
the way it should work. Anyway, I attached the patch for mod_logio.c to make it
work the way I described in case there’s really a bug in the module.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message