http: remove pointless use of arguments

PR-URL: https://github.com/nodejs/node/pull/10664
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
cjihrig 2017-01-10 11:58:08 -05:00
Родитель 022b53c9de
Коммит a73ab9de0d
1 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -382,8 +382,8 @@ OutgoingMessage.prototype.setHeader = function setHeader(name, value) {
OutgoingMessage.prototype.getHeader = function getHeader(name) {
if (arguments.length < 1) {
throw new Error('"name" argument is required for getHeader(name)');
if (typeof name !== 'string') {
throw new TypeError('"name" argument must be a string');
}
if (!this._headers) return;
@ -393,8 +393,8 @@ OutgoingMessage.prototype.getHeader = function getHeader(name) {
OutgoingMessage.prototype.removeHeader = function removeHeader(name) {
if (arguments.length < 1) {
throw new Error('"name" argument is required for removeHeader(name)');
if (typeof name !== 'string') {
throw new TypeError('"name" argument must be a string');
}
if (this._header) {