Skip to content

Comments

http: logs custom headers in a subobject#8714

Closed
catenacyber wants to merge 1 commit intoOISF:masterfrom
catenacyber:http-customlog-5320-v7
Closed

http: logs custom headers in a subobject#8714
catenacyber wants to merge 1 commit intoOISF:masterfrom
catenacyber:http-customlog-5320-v7

Conversation

@catenacyber
Copy link
Contributor

Link to redmine ticket:
https://redmine.openinfosecfoundation.org/issues/5320

Describe changes:

  • http: logs custom headers in a subobject

To avoid collisions, for instance for content_range

With this PR, the output will be

    "content_range": {
      "raw": "bytes 10-20/69",
      "start": 10,
      "end": 20,
      "size": 69
    },
    "response_headers": [
      {
        "name": "Content-Range",
        "value": "bytes 10-20/69"
      }
    ]

instead of

    "content_range": {
      "raw": "bytes 10-20/69",
      "start": 10,
      "end": 20,
      "size": 69
    },
   "content_range": "bytes 10-20/69"

response_headers is already used with the config option dump-all-headers

suricata-verify-pr: 1026

Replaces #8672 with better code style for a variable name

This subobject is request_headers or response_headers

This especially avoids json keys collisions.

Ticket: OISF#5320

Also fixes typo referrer/referer
@catenacyber
Copy link
Contributor Author

@suricata-qa
Copy link

WARNING:

field baseline test %
SURI_TLPW1_stats_chk
.tcp.rst 113181 145112 128.21%

Pipeline 13113

@catenacyber catenacyber mentioned this pull request May 31, 2023
@victorjulien victorjulien mentioned this pull request Jun 2, 2023
@victorjulien
Copy link
Member

Merged in #8951, thanks!

I think this needs an upgrade doc entry still btw.

@catenacyber
Copy link
Contributor Author

Indeed, see #8978

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants