Skip to content

Conversation

@alexlivekit
Copy link
Contributor

Now that the new validation has been out for a bit, but only as a warning, this is a follow-up.

Behavior changes:

  1. Fail on new validation failing, no longer just a warning.
  2. Dropped global logs.
  3. Validate proper quoting for display name.

Validation changes:

  1. Added the '\t' character previously omitted.
  2. Allow UTF-8 characters in header values (Spotted one customer with U-8217, or 舗 which apparently means shop).
  3. Allow empty headers. These do no harm imo.
  4. Fixed validation of 0x7F.

@changeset-bot
Copy link

changeset-bot bot commented Oct 30, 2025

🦋 Changeset detected

Latest commit: ea88da0

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

💥 An error occurred when fetching the changed packages and changesets in this PR
Some errors occurred when validating the changesets config:
The package or glob expression "github.com/livekit/protocol" specified in the `fixed` option does not match any package in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch.

lowerName := strings.ToLower(name)
if forbidden, exists := FrobiddenSipHeaderNames[lowerName]; exists && forbidden {
return fmt.Errorf("header name %s not supported", name)
if restrictNames {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gated behind a boolean check - we want to be able to specify "forbidden" headers in HeadersToAttributes and AttributesToHeaders, but not in Headers.

@alexlivekit alexlivekit merged commit 2f76678 into main Nov 14, 2025
8 checks passed
@alexlivekit alexlivekit deleted the header-validation branch November 14, 2025 18:16
This was referenced Nov 14, 2025
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.

3 participants