Skip to content

Backport of Check websocket upgrade headers correctly with multiple values into release/2.0.x#28235

Merged
allisonlarson merged 2 commits into
release/2.0.xfrom
backport/b-websockets/smoothly-emerging-ant
Jul 10, 2026
Merged

Backport of Check websocket upgrade headers correctly with multiple values into release/2.0.x#28235
allisonlarson merged 2 commits into
release/2.0.xfrom
backport/b-websockets/smoothly-emerging-ant

Conversation

@hc-github-team-nomad-core

Copy link
Copy Markdown
Contributor

Backport

This PR is auto-generated from #28234 to be assessed for backporting due to the inclusion of the label backport/2.0.x.

The below text is copied from the body of the original PR.


Description

Some browsers will add additional Connection headers, (keep-alive), and send them as a comma separated list, which won't parse correctly by just using req.Header.Get. Updates the header check to use gorilla/websockets logic to ensure we can support these headers, and add tests to prevent regressions.

Testing & Reproduction steps

Added test to highlight the problem, even though it ends up testing the gorilla/websocket package. It's more to highlight that we should be able to handle these types of headers.

Links

Fixes #28216

Contributor Checklist

  • Changelog Entry If this PR changes user-facing behavior, please generate and add a
    changelog entry using the make cl command.
  • Testing Please add tests to cover any new functionality or to demonstrate bug fixes and
    ensure regressions will be caught.
  • Documentation If the change impacts user-facing functionality such as the CLI, API, UI,
    and job configuration, please update the Nomad product documentation, which is stored in the
    web-unified-docs repo. Refer to the web-unified-docs contributor guide for docs guidelines.
    Please also consider whether the change requires notes within the upgrade
    guide
    . If you would like help with the docs, tag the nomad-docs team in this PR.
  • LLM Usage If an LLM was used to generate any code, please ensure and confirm you have read
    and followed the AI usage guide.

Reviewer Checklist

  • Backport Labels Please add the correct backport labels as described by the internal
    backporting document.
  • Commit Type Ensure the correct merge method is selected which should be "squash and merge"
    in the majority of situations. The main exceptions are long-lived feature branches or merges where
    history should be preserved.
  • Enterprise PRs If this is an enterprise only PR, please add any required changelog entry
    within the public repository.
  • If a change needs to be reverted, we will roll out an update to the code within 7 days.

Changes to Security Controls

Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.


Overview of commits
@allisonlarson allisonlarson merged commit ef7db4b into release/2.0.x Jul 10, 2026
31 checks passed
@allisonlarson allisonlarson deleted the backport/b-websockets/smoothly-emerging-ant branch July 10, 2026 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants