Jwt #142

Closed
micoli wants to merge 129 commits from jwt into master
Showing only changes of commit 9ad43778b7 - Show all commits
+8 -4
View File
@@ -30,10 +30,14 @@ HeaderHostTransformer.prototype._transform = function (chunk, enc, cb) {
// after replacing the first instance of the Host header // after replacing the first instance of the Host header
// we just become a regular passthrough // we just become a regular passthrough
self.push(chunk.replace(/(\r\nHost: )\S+/, function(match, $1) { if (!self.replaced) {
self._transform = undefined; self.push(chunk.replace(/(\r\nHost: )\S+/, function(match, $1) {
return $1 + self.host; self.replaced = true;
})); return $1 + self.host;
}));
} else {
self.push(chunk);
}
cb(); cb();
}; };