mirror of
https://github.com/nodejs/node.git
synced 2025-05-04 22:16:16 +00:00

PR-URL: https://github.com/nodejs/node/pull/17497 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
13 lines
271 B
JavaScript
13 lines
271 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
const http = require('http');
|
|
|
|
common.expectsError(
|
|
() => http.request({ method: '\0' }),
|
|
{
|
|
code: 'ERR_INVALID_HTTP_TOKEN',
|
|
type: TypeError,
|
|
message: 'Method must be a valid HTTP token ["\u0000"]'
|
|
}
|
|
);
|