Skip to content

test(repeater): cover empty response header values - #838

Merged
aborovsky merged 7 commits into
nextfrom
test/empty-response-header-values
Nov 27, 2026
Merged

aborovsky merged 7 commits into
nextfrom
test/empty-response-header-values

Conversation

@aborovsky

Copy link
Copy Markdown
Contributor

What

Regression tests for response headers with an empty value, taken from #835 without its header parser.

@brightsec/node-libcurl 5.2.0 (#836) fixes parseHeaders, so HttpRequestExecutor now delivers expires: as ''. Before that, the header reached bridges as a "expires: " key with an undefined value. These tests run real libcurl and pin the behavior, so a later bump cannot silently bring the bug back:

  • HTTP/1.1 raw-TCP target sending expires:, cache-control: , pragma:, x-nospace:value, x-padded: value .
  • HTTP/2 TLS target sending empty expires, cache-control, pragma and two set-cookie.
  • Both tests check that no header name contains : or whitespace and no value is undefined.

The HTTP/2 server uses a self-signed certificate generated per run with node-forge, which is now a devDependency (pinned to ^1.4.1 to match the existing overrides entry; the lockfile moves it from 1.4.3 to 1.4.4). No private key is committed.

Verification

  • On node-libcurl 5.2.0: both new tests pass, along with all 366 unit tests, lint and prettier.
  • On node-libcurl 5.1.6: both new tests fail.

Merge order

This PR is stacked on #836 (base chore/node-libcurl-5.2.0) because the tests need node-libcurl 5.2.0. Once #836 is merged, it will be retargeted to next.

The fork now includes upstream node-libcurl 5.2.0 (Multi/Easy lifetime and
transfer ownership fixes, READFUNCTION/SEEKFUNCTION hardening, Brotli 1.2.1)
and the OpenSSL error queue fix that so far was only in 5.1.7-1.
5.2.0-2 installs the prebuilt binary on Windows without first building
curl and its dependencies with vcpkg, which took 20-30 minutes per install.
5.2.0 is the stable release of the same code as 5.2.0-2.
Targets that send a header with an empty value (`expires:`, HTTP/2
`cache-control: ''`) used to reach bridges as a `"name: "` key with an
undefined value, because node-libcurl's parseHeaders split on /:\s(.+)/.
node-libcurl 5.2.0 fixes the parser; these tests run real libcurl against an
HTTP/1.1 and an HTTP/2 TLS target so a future dependency bump cannot bring
the bug back unnoticed.

The HTTP/2 server gets a self-signed certificate generated per run with
node-forge (now a devDependency) instead of a committed private key.
Base automatically changed from chore/node-libcurl-5.2.0 to next November 27, 2026 09:22
@aborovsky aborovsky self-assigned this Nov 27, 2026
@aborovsky
aborovsky merged commit f227a6c into next Nov 27, 2026
11 checks passed
@aborovsky
aborovsky deleted the test/empty-response-header-values branch November 27, 2026 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants