Add possibility to send early hints headers
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 1.6k
- Forks
- 239
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 10
Description
It would be a great thing to be able to send HTTP 103 headers aka early hints using njs, actually, tryed using
r.headersOut['Link'] = '</style.css>; rel=preload; as=style';
r.headersOut['Link'] = '</script.js>; rel=preload; as=script';
r.return(103, "");
in js_content or when setting a variable with js_var...
but got error curl: (92) HTTP/2 stream 1 was not closed cleanly: PROTOCOL_ERROR (err 1)
makes sens, so needs internal support for this?
regards
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by examining how response headers are handled from js_content and when setting a variable with js_var., including r.headersOut and the attempted HTTP 103 response. Determine the internal support needed for early hints so the HTTP/2 request completes without a PROTOCOL_ERROR; done means njs can send HTTP 103 headers correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, javascript, nginx
- Domain
- backend, networking
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100