Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Update socket.js #525

Closed
wants to merge 1 commit into from

3 participants

Edgar Alves da Mota Veiga Sanjay Igor Sloockiy
Edgar Alves da Mota Veiga

If "sync disconnect on unload" is set to true I was getting a lot of errors like these: 
 -> "XMLHttpRequest cannot load http://s1.test.com/socket.io/1//L1VtwrMiikmwXVoEQF2o/?disconnect=1. Origin http://www.teste2.com is not allowed by Access-Control-Allow-Origin."

I found out that this was being caused by the extra slash right before the session_id on the url!

This fix removes that extra space on the uri formation (Why is it there?)

Best Regards

Edgar Alves da Mota Veiga eveiga Update socket.js
If "sync disconnect on unload" is set to true I was getting a lot of errors like these: 
 -> XMLHttpRequest cannot load http://s1.test.com/socket.io/1//L1VtwrMiikmwXVoEQF2o/?disconnect=1. Origin http://www.teste2.com is not allowed by Access-Control-Allow-Origin.




I found out that this was being caused by the extra slash right before the sessions_id on the url! This fix removes that extra space on the uri formation (Why is it there?)




Best Regards
7f4154a
Sanjay

what version will have this fix? how do i get this fix on heroku if it is not available via npm?

Igor Sloockiy

I have the same problem. How soon it will be fixed?

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 7, 2013
  1. Edgar Alves da Mota Veiga

    Update socket.js

    eveiga authored
    If "sync disconnect on unload" is set to true I was getting a lot of errors like these: 
     -> XMLHttpRequest cannot load http://s1.test.com/socket.io/1//L1VtwrMiikmwXVoEQF2o/?disconnect=1. Origin http://www.teste2.com is not allowed by Access-Control-Allow-Origin.
    
    
    
    
    I found out that this was being caused by the extra slash right before the sessions_id on the url! This fix removes that extra space on the uri formation (Why is it there?)
    
    
    
    
    Best Regards
This page is out of date. Refresh to see the latest.
Showing with 0 additions and 1 deletion.
  1. +0 −1  lib/socket.js
1  lib/socket.js
View
@@ -363,7 +363,6 @@
, this.options.host + ':' + this.options.port
, this.options.resource
, io.protocol
- , ''
, this.sessionid
].join('/') + '/?disconnect=1';
Something went wrong with that request. Please try again.