-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
fix(node:http) Export validateHeaderName
and validateHeaderValue
functions
#22616
Conversation
validateHeaderName
and validateHeaderValue
validateHeaderName
and validateHeaderValue
functions
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.
Formatting check fails.
Also, could you add "test-http-header-validators.js"
string to tests/node_compat/config.jsonc
line 369. I think that should enable the tests for these.
Here's a good example of what enabling a node test entails: https://github.com/denoland/deno/pull/22489/files#diff-66a13180ca921c746469f8f0bf6ec0cafab925839d65fdca6379866c4bb7be40 Note this part:
|
The fmt issues should be now fixed and a relevant node_compat test is also activated. Please review again. |
Please take a look at this more or less trivial modifications and merge them! The included changes are so simple, that I didn't open a new branch when I opened this PR, but in the meantime I prepared a lot of other more extensive patches for sorry! |
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, thanks, good fix.
…functions (#22616) Modify `_http_outgoing.ts` to support the extended signature of `validateHeaderName()` used since node v19.5.0/v18.14.0 by adding the `label` parameter. (see: https://nodejs.org/api/http.html#httpvalidateheadernamename-label) Making both validation functions accessible as public exports of `node:http` Fixes: #22614
Modify
_http_outgoing.ts
to support the extended signature ofvalidateHeaderName()
used since node v19.5.0/v18.14.0 by adding thelabel
parameter. (see: https://nodejs.org/api/http.html#httpvalidateheadernamename-label)Making both validation functions accessible as public exports of
node:http
Fixes: #22614