summaryrefslogtreecommitdiff
path: root/test/parallel/test-http-client-unescaped-path.js
blob: eefae90541f66de8826f45248f10ee6cb1b09e32 (plain)
1
2
3
4
5
6
7
8
9
10
'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.mustNotCall()),
                /contains unescaped characters/);
}