Skip to content

%<cqtx> log field shows HTTP/1.1 for HTTP/2 requests #10066

Closed

Description

@lzx404243

Issue

The %<cqtx> logs the client request line consisting of the method, uri and the http version. The http version is inaccurate for http/2 requests:

127.0.0.1 - - [18/Jul/2023:23:01:45 -0000] "POST https://127.0.0.1:61016/some/path3?foo=bar HTTP/1.1" 404 0

workaround

To capture the client request line with the accurate http version, the %<cqtx> field can be replaced by %<cqhm> %<pqu> %<cqpv> , like in the following logging.yaml:

logging:
  formats:
    - name: old
      format: '%<chi> - %<caun> [%<cqtn>] "%<cqtx>" %<pssc> %<pscl>'
    - name: new
      format: '%<chi> - %<caun> [%<cqtn>] "%<cqhm> %<pqu> %<cqpv>" %<pssc> %<pscl>'
  logs:
    - filename: access
      format: old
    - filename: access-new
      format: new

Activity

  1. added this to the 10.0.0 milestone on Jul 19, 2023
  2. lzx404243 commented on Jul 19, 2023

    @lzx404243
    MemberAuthor

    Discussed with @maskit, fixing this log field would require either a huge incompatible change to HttpSM, or an additional field to store the real http version for the request just for the sake of logging.

    We believes the %<cqtx> can be deprecated as it's showing inaccurate information and its information can be fully reproduced via other log fields, as shown in the workaround.

  3. maskit commented on Jul 19, 2023

    @maskit
    Member

    It's the case for H3 as well, and the same workaround works.

  4. added a commit that references this issue on Aug 15, 2023
    ed9e6db
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions