whatwg / whatwg/fetch

section #connections is vague wrt connection is HTTP or HTTPS or HTTP/2 or QUIC

Open
#641 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

topic: connections
Dominant language
HTML
Stars
2.3k
Forks
403
Avg merge
21h 16m
Merged PRs (30d)
4

Description

The obtain a connection algorithm in section #connections presently says this:

Set connection to the result of establishing an HTTP connection to origin. [HTTP] [HTTP-SEMANTICS] [HTTP-COND] [HTTP-CACHING] [HTTP-AUTH] [TLS]

If credentials is false, then do not send a TLS client certificate.

However, one is not going to "send a TLS client certificate" if one is not running over TLS, and there is no context in this alg whether or not a HTTP or HTTPS or HTTP/2 or QUIC or whatever connection is established.

Given the associated Note says in part: "This is intentionally a little vague as the finer points are still evolving." this is likely understood, tho I did not find an already-open issue regarding this, thus am submitting this one.

Offhand, it seems one way to nominally address this is to:

  • declare a connectionType enum with values of "HTTP, HTTPS, HTTP/2, QUIC" (for now),
  • pass a connectionType param to the obtain a connection algorithm,
  • add connectionType as part of the per-connection state maintained by the connection pool
  • add logic to obtain a connection alg to open conn of specific type per connectionType.

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

Read section #connections and the obtain a connection algorithm, including the associated Note and the referenced HTTP, TLS, and related specifications. Define how the connection type and per-connection state should be represented, then ensure the algorithm and TLS client-certificate behavior are no longer ambiguous.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.