Skip to content

http: logs custom headers in a subobject#8264

Closed
catenacyber wants to merge 1 commit into
OISF:masterfrom
catenacyber:http-customlog-5320-v4
Closed

http: logs custom headers in a subobject#8264
catenacyber wants to merge 1 commit into
OISF:masterfrom
catenacyber:http-customlog-5320-v4

Conversation

@catenacyber
Copy link
Copy Markdown
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 #8241 with fixing multiple custom fields being logged

This subobject is request_headers or response_headers

This especially avoids json keys collisions.

Ticket: OISF#5320

Also fixes typo referrer/referer
@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 8, 2022

Codecov Report

Merging #8264 (d4a491d) into master (64c0459) will decrease coverage by 0.06%.
The diff coverage is 86.48%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8264      +/-   ##
==========================================
- Coverage   81.65%   81.59%   -0.07%     
==========================================
  Files         968      963       -5     
  Lines      278598   278014     -584     
==========================================
- Hits       227502   226848     -654     
- Misses      51096    51166      +70     
Flag Coverage Δ
fuzzcorpus 63.49% <51.35%> (-0.22%) ⬇️
suricata-verify 59.42% <86.48%> (-0.05%) ⬇️
unittests 63.34% <0.00%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@suricata-qa
Copy link
Copy Markdown

Information:

field baseline test %
TREX_GENERIC_stats_chk
.capture.kernel_drops 0 395 0.00

Pipeline 11118

@suricata-qa
Copy link
Copy Markdown

ERROR:

ERROR: QA failed on TREX_GENERIC_stats_chk.

Pipeline 11118

@catenacyber
Copy link
Copy Markdown
Contributor Author

Replaced by #8669

@catenacyber catenacyber closed this Apr 3, 2023
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.

3 participants