-
-
Notifications
You must be signed in to change notification settings - Fork 736
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(recorder): allow recording req headers when not outputting objects (
#1617) * test: add coverage for logging recorded objects There was no test that `output_objects: true`, without also setting `dont_print: true` so this flow was not covered. * fix: allow recording req headers when not outputting objects When exploring coverage gaps a few things were uncovered: - OutgoingMessage._headers has been deprecated in favor of `getHeaders()`. https://nodejs.org/api/deprecations.html#deprecations_dep0066_outgoingmessage_prototype_headers_outgoingmessage_prototype_headernames - IncommingMessage.rawHeaders is never falsy so there isn't a need to fall back to `headers` - There was a bug that kept request headers from being added to `matchHeader` lines in non-object outputs. `enable_reqheaders_recording` was only having an affect if `output_objects` was also true, but headers were never being added despite that because it was looking for headers under the wrong attribute on the request. A test was added to cover the flow of wanting the `matchHeader` as the other flow was already covered.
- Loading branch information
1 parent
f616df9
commit 7c84b3e
Showing
4 changed files
with
112 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters