Permalink
Browse files

Copy response headers case-insensitively

  • Loading branch information...
1 parent 2499b20 commit 35c882d5bbf7e3c307f9dd10beac8edcf7d872e4 @gilad61 committed Jul 19, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/node-http-proxy/http-proxy.js
@@ -244,7 +244,10 @@ HttpProxy.prototype.proxyRequest = function (req, res, buffer) {
}
// Set the headers of the client response
- res.writeHead(response.statusCode, response.headers);
+ Object.keys(response.headers).forEach(function(key){
+ res.setHeader(key, response.headers[key]);
+ });
+ res.writeHead(response.statusCode);
// If `response.statusCode === 304`: No 'data' event and no 'end'
if (response.statusCode === 304) {

0 comments on commit 35c882d

Please sign in to comment.