Browse files

Strip out \r better

  • Loading branch information...
1 parent afc2e19 commit 48d953860fe5a3481d4c517d674b31d723d32882 @carlos8f committed Jul 21, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 index.js
View
4 index.js
@@ -92,12 +92,12 @@ function zerofill(num, length) {
function getHeader(res, name) {
if (res._header && res._headerSent && !res._sentHeaders) {
res._sentHeaders = {};
- res._header.split('\n').forEach(function(line) {
+ res._header.split('\r\n').forEach(function(line) {
var header = line.split(': ');
if (header.length > 1) {
res._sentHeaders[header[0]] = header[1];
}
});
}
- return (res._sentHeaders && res._sentHeaders[name].replace(/\r/g, '')) || null;
+ return (res._sentHeaders && res._sentHeaders[name]) || null;
}

0 comments on commit 48d9538

Please sign in to comment.