New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: spec compliant early hints #5
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do anyone have time to see why tap
is not proceed to next test
in node@14
and node@16
?
It seems that teardown is not called when the tests are finished because they still run because undici is still connected or so. So you have to explicitly close the client |
Strange enough, I though it would be No Idea, why |
I have just two remarks:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Co-authored-by: Simen Bekkhus <sbekkhus91@gmail.com>
Strange. in node 14 we never get socket === null? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Co-authored-by: Manuel Spigolon <behemoth89@gmail.com>
I patched and pushed example.js to run my tests |
I opened an issue in autocannon regarding the wrong stats I get from early hints I actually would have loved to have a stress test, where i would expect 50% 103 and 50% 200 status to have the confidence that it works properly. But my manual testing was successful so I am confident that this plugin is working reliable. |
I would merge it and we could wait a sec before realising it. Is ok for you @Uzlopak ? |
Of course ;) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Here is the implementation that should fit the spec.
Link
headerEarly Hints
undici
to testIn this PR, I provide two function which is
writeEarlyHints
andwriteEarlyHintsLink
writeEarlyHints
can be used to write any header.writeEarlyHintsLink
is used to writeLink
header like previous version.Checklist
npm run test
andnpm run benchmark
and the Code of conduct