Permalink
Browse files

[fix] Include port in the host header

Fixes #4.
  • Loading branch information...
1 parent 80f77d8 commit 844220a1beb0db4530173decfa7a943b56a9b47c @mmalecki committed Jul 21, 2013
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/http-console.js
View
@@ -93,7 +93,9 @@ this.Console.prototype = new(function () {
this.request = function (method, path, headers, callback) {
var request, that = this;
- this.headers['Host'] = this.headers['Host'] || this.host;
+ this.headers.host =
+ this.headers.host ||
+ this.host + (this.port === 80 ? '' : ':' + this.port.toString());
for (var k in this.headers) { headers[k] = this.headers[k]; }

0 comments on commit 844220a

Please sign in to comment.