Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

response: use _renderHeaders from ServerResponse

fix #56
  • Loading branch information...
commit d891884276b603d04d63105778e21ad96cc53436 1 parent a15969c
@indutny authored
Showing with 6 additions and 7 deletions.
  1. +6 −7 lib/spdy/response.js
View
13 lib/spdy/response.js
@@ -1,5 +1,6 @@
var spdy = require('../spdy'),
- http = require('http');
+ http = require('http'),
+ res = http.ServerResponse.prototype;
//
// ### function _renderHeaders ()
@@ -11,15 +12,13 @@ exports._renderHeaders = function() {
throw new Error("Can't render headers after they are sent to the client.");
}
- if (!this._headers) return {};
-
- var headers = {};
- var keys = Object.keys(this._headers);
+ var keys = Object.keys(this._headerNames);
for (var i = 0, l = keys.length; i < l; i++) {
var key = keys[i];
- headers[(this._headerNames[key] || '').toLowerCase()] = this._headers[key];
+ this._headerNames[key] = this._headerNames[key].toLowerCase();
}
- return headers;
+
+ return res._renderHeaders.call(this);
};
//
Please sign in to comment.
Something went wrong with that request. Please try again.