Skip to content

Commit

Permalink
Respect specified {Host,host} headers, not just {host}
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewschaaf committed Feb 8, 2013
1 parent 28e8be5 commit 22bc67d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ Request.prototype.init = function (options) {
self.headers = self.headers ? copy(self.headers) : {}

self.setHost = false
if (!self.headers.host) {
if (!(self.headers.host || self.headers.Host)) {
self.headers.host = self.uri.hostname
if (self.uri.port) {
if ( !(self.uri.port === 80 && self.uri.protocol === 'http:') &&
Expand Down

0 comments on commit 22bc67d

Please sign in to comment.