summaryrefslogtreecommitdiff
path: root/test/parallel/test-http-status-reason-invalid-chars.js
AgeCommit message (Collapse)Author
2017-12-03test: update test-http-status-reason-invalid-chars to use countdownMithun Sasidharan
PR-URL: https://github.com/nodejs/node/pull/17342 Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
2017-01-22test: don't connect to :: (use localhost instead)Gibson Fahnestock
If a test does http.listen(0) or net.listen(0), http.listen(0).address().address returns '::'. Some machines will resolve this to localhost, but not all. Every machine should have localhost defined in /etc/hosts (or equivalent), so it should always resolve. Fixes: https://github.com/nodejs/node/issues/7291 PR-URL: https://github.com/nodejs/node/pull/10854 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michal Zasso <targos@protonmail.com>
2016-11-29test: refine test-http-status-reason-invalid-charsRich Trott
* replace unneeded template strings with strings; there was no variable substitution or concatenation or anything like that * assert.notEqual() -> assert.notStrictEqual() PR-URL: https://github.com/nodejs/node/pull/9802 Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2016-11-27test: fix test-http-status-reason-invalid-charsYosuke Saito
Use port 0 instead of common.PORT, and use server address instead of localhost to follow writing test guideline. This is a part of Code And Learn at NodeFest 2016 Challenge in Tokyo. PR-URL: https://github.com/nodejs/node/pull/9572 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp> Reviewed-By: James M Snell <jasnell@gmail.com>
2016-09-28http: check reason chars in writeHeadEvan Lucas
Previously, the reason argument passed to ServerResponse#writeHead was not being properly validated. One could pass CRLFs which could lead to http response splitting. This commit changes the behavior to throw an error in the event any invalid characters are included in the reason. CVE-2016-5325 PR-URL: https://github.com/nodejs/node-private/pull/60 Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>