summaryrefslogtreecommitdiff
path: root/test/parallel/test-http-invalid-urls.js
AgeCommit message (Collapse)Author
2018-04-29http,https,tls: switch to WHATWG URL parserHackzzila
This switches the url parser from `url.parse()` to the WHATWG URL parser while keeping `url.parse()` as fallback. Also add tests for invalid url deprecations and correct hostname checks. PR-URL: https://github.com/nodejs/node/pull/20270 Fixes: https://github.com/nodejs/node/issues/19468 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-04-16errors: alter ERR_INVALID_DOMAIN_NAMEdavidmarkclements
Changes the base instance for ERR_INVALID_DOMAIN_NAME from Error to TypeError as a more accurate representation of the error. PR-URL: https://github.com/nodejs/node/pull/19961 Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-02-20lint: move eslint to new plugin systemGus Caplan
PR-URL: https://github.com/nodejs/node/pull/18566 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
2017-10-01test: fix and refactor test-http-invalid-urlsRich Trott
When the second argument to `assert.throws()` is a string, it is not treated as the expected error message but rather the message that the assertion should display if no error is thrown. Ths change fixes that error in `test-http-invalid-urls.js`. Instead of skipping the test when there is no crypto, the test is now run but with `http` only. `https` is skipped. Logging was fixed. Previously, errors would be written out as being in the `[object Object]` module rather than `http` or `https`. PR-URL: https://github.com/nodejs/node/pull/15678 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-07-04test: simplify test skippingVse Mozhet Byt
* Make common.skip() exit. Also add common.printSkipMessage() for partial skips. * Don't make needless things before skip PR-URL: https://github.com/nodejs/node/pull/14021 Fixes: https://github.com/nodejs/node/issues/14016 Reviewed-By: Refael Ackermann <refack@gmail.com>
2016-06-08test: fix tests for non-crypto buildsAnna Henningsen
Fix running the tests when node was compiled without crypto support. Some of these are cleanup after 52bae222a3a8480b2, where common was used before it was required. PR-URL: https://github.com/nodejs/node/pull/7056 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2015-10-27http{s}: don't connect to localhost on invalid URLSakthipriyan Vairamani
If the URL passed to `http{s}.request` or `http{s}.get` is not properly parsable by `url.parse`, we fall back to use `localhost` and port 80. This creates confusing error messages like in this question http://stackoverflow.com/q/32675907/1903116. This patch throws an error message, if `url.parse` fails to parse the URL properly. Previous Discussion: https://github.com/nodejs/node/pull/2966 PR-URL: https://github.com/nodejs/node/pull/2967 Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: James M Snell <jasnell@gmail.com>