Skip to content

Commit

Permalink
Fixing host port addition. Rolling version.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeal committed Jul 18, 2010
1 parent 186e9cf commit 09e7ade
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ function request (options, callback) {
if (!options.headers.host) {
options.headers.host = options.uri.hostname;
if (options.uri.port) {
if ( !(options.uri.port === 80 && options.uri.protocol === 'http:') &&
!(options.uri.port === 443 && options.uri.protocol === 'https:') )
options.headers.host += (':'+options.uri.port)
}
var setHost = true;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{ "name" : "request"
, "description" : "Simplified HTTP request method."
, "tags" : ["http", "simple", "util", "utility"]
, "version" : "0.9.5"
, "version" : "0.10.0"
, "author" : "Mikeal Rogers <mikeal.rogers@gmail.com>"
, "directories" :
{ "lib" : "lib" }
Expand Down

0 comments on commit 09e7ade

Please sign in to comment.