Skip to content

Commit

Permalink
Merge pull request socketio#827 from crickeys/patch-4
Browse files Browse the repository at this point in the history
Fixes when browser doesn't send origin header, defaults to empty string ...
  • Loading branch information
rauchg committed Apr 11, 2012
2 parents a4e53a6 + 1a5a87a commit 9bbf17f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/transports/websocket/hybi-16.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

/*!
* socket.io-node
* Copyright(c) 2011 LearnBoost <[email protected]>
Expand Down Expand Up @@ -98,7 +97,7 @@ WebSocket.prototype.onSocketConnect = function () {
return;
}

var origin = this.req.headers['origin']
var origin = this.req.headers['origin'] || ''
, location = ((this.manager.settings['match origin protocol'] ?
origin.match(/^https/) : this.socket.encrypted) ?
'wss' : 'ws')
Expand Down

0 comments on commit 9bbf17f

Please sign in to comment.