wandenberg / nginx-push-stream-module

A pure stream http push technology for your Nginx setup. Comet made easy and really scalable.
Other
2.22k stars 295 forks source link

pushstream.js Utils.isCrossDomainUrl bugfix for IE #170

Closed arusakov closed 9 years ago

arusakov commented 9 years ago

Hi, wandenberg

Current code for parsing url:

var parser = document.createElement('a');
parser.href = url; 

If url does not contains port, for example "http://test.com", IE behaves differently then other browsers.

Browser location.port parser.port
Chrome 39 '' ''
Firefox 34 '' ''
Opera 12.16 '' ''
IE9 '' '80'
IE 11 '' '80'

normalizePort() fix that for http and https protocols.

wandenberg commented 9 years ago

Merged with small changes. Thanks