Skip to content

http: make early hints implementation more generic #44816

Closed

Description

@mcollina

In #44180, we thought that the "early hints" implementation is not complete as it landed.

We need to fix it either as:

response.writeEarlyHints({
  link: 'your link header',
  x-trace-id: 'id for diagnostics'
})

or

response.writeInfomation(103, "Early Hints", {
  link: 'your link header',
  x-trace-id: 'id for diagnostics'
})

Activity

  1. added
    http
    good first issue
    on Sep 29, 2022
  2. anonrig commented on Sep 29, 2022

    @anonrig
    Member

    I'm working on this task, and will open a pull request soon.

  3. anonrig commented on Sep 29, 2022

    @anonrig
    Member

    Can a link header be a string and an array just like the parameter type of response.writeEarlyHints?

    For example should both of them be valid?

    response.writeEarlyHints({
      link: ['</styles.css>; rel=preload; as=style']
    })
    response.writeEarlyHints({
      link: '</styles.css>; rel=preload; as=style'
    })
  4. mcollina commented on Sep 29, 2022

    @mcollina
    SponsorMemberAuthor

    Yes

  5. added a commit that references this issue on Oct 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issuehttp

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions