Browse Source

http: remove 'headers sent?' check in OutgoingMessage.getHeader()

Fixes #752.
Peter Lyons 14 years ago
committed by Ben Noordhuis
parent
commit
a4eee3d28f
  1. 4
      lib/http.js
  2. 4
      lib/http2.js

4
lib/http.js

@ -540,10 +540,6 @@ OutgoingMessage.prototype.getHeader = function(name) {
throw new Error("`name` is required for getHeader().");
}
if (this._header) {
throw new Error("Can't use mutable header APIs after sent.");
}
if (!this._headers) return;
var key = name.toLowerCase();

4
lib/http2.js

@ -540,10 +540,6 @@ OutgoingMessage.prototype.getHeader = function(name) {
throw new Error("`name` is required for getHeader().");
}
if (this._header) {
throw new Error("Can't use mutable header APIs after sent.");
}
if (!this._headers) return;
var key = name.toLowerCase();

Loading…
Cancel
Save