-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
test: invalid chars in http client path #11964
test: invalid chars in http client path #11964
Conversation
2424b76
to
ae7cdbe
Compare
const server = http.createServer((req, res) => { | ||
res.end(); | ||
server.close(); | ||
}).listen(0, test); |
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.
Can you add common.mustCall()
around the callback.
I think it would be better to try a path string for each control character instead of all of them together. Also, I don't think we need to spin up a server just to check for the |
Definitely agree with @mscdex. Testing each individually would be more robust. |
This test adds coverage for all the characters which are considered invalid in a http path.
729b3d9
to
f9c57fe
Compare
extremely minor nit: for the "experimentally" determined number, it may be useful to include a comment that describes the process you followed to find that number :-) |
I guess the comment should be added here Line 108 in ee19e29
|
This test adds coverage for all the characters which are considered invalid in a http path. PR-URL: #11964 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]>
Landed in 30f1e8e |
This test adds coverage for all the characters which are considered invalid in a http path. PR-URL: #11964 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]>
This test adds coverage for all the characters which are considered invalid in a http path. PR-URL: #11964 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]>
This test adds coverage for all the characters which are considered invalid in a http path. PR-URL: #11964 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]>
This test adds coverage for all the characters which are considered invalid in a http path. PR-URL: nodejs/node#11964 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]>
This test adds coverage for all the characters which are considered
invalid in a http path.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
test http-client