w3c / w3c/ServiceWorker

NavigationPreloadManager.setHeader spec should verify valid HTTP header values

Open
#1,474 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Bikeshed
Stars
3.6k
Forks
324
Avg merge
14d 22h
Merged PRs (30d)
1

Description

The corresponding WPTs expect setHeader to reject when called with a value containing the null byte or HTTP newline bytes. It's unclear whether setHeader should also prohibit or trim leading and trailing whitespace. The Fetch standard defines a HTTP header value as having no leading or trailing whitespace, though.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked WPT at service-workers/service-worker/navigation-preload/get-state.https.html and compare its expected behavior with the Fetch standard's HTTP header value definition. Resolve whether leading and trailing whitespace should be rejected or trimmed, then update the Service Worker specification so the null-byte, newline, and whitespace behavior is unambiguous.

Written by the indexing model from the issue text.

Assessment

Domain
documentation, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.