mirror of
https://github.com/nodejs/node.git
synced 2025-05-04 13:07:46 +00:00

PR-URL: https://github.com/nodejs/node/pull/9649 Reviewed-By: Trevor Norris <trev.norris@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
11 lines
314 B
JavaScript
11 lines
314 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
const assert = require('assert');
|
|
const http = require('http');
|
|
|
|
for (let i = 0; i <= 32; i += 1) {
|
|
const path = 'bad' + String.fromCharCode(i) + 'path';
|
|
assert.throws(() => http.get({ path }, common.fail),
|
|
/contains unescaped characters/);
|
|
}
|