jpillora / xdomain

A pure JavaScript CORS alternative
https://jpillora.com/xdomain/
3.12k stars 269 forks source link

Firefox 31.7 ESR running into timeout #152

Open canner85 opened 9 years ago

canner85 commented 9 years ago

Hey,

I successfully implemented xdomain for e.g. IE9. It is working great! Unfortunately, I had CORS problems with Firefox 31.7 ESR version, which is used by some clients... So I added xdomain for this FF version, too, but it is running into a timeout.

My slave's proxy.html

<!DOCTYPE HTML>
<script src="//cdn.rawgit.com/jpillora/xdomain/0.7.3/dist/xdomain.min.js"></script>
<script>
  xdomain.masters({
    'https://test.local': '*',
    'https://test2.local': '*',
  });
</script>

My master snippet:

<script src="//cdn.rawgit.com/jpillora/xdomain/0.7.3/dist/xdomain.min.js">
<script>
  xdomain.slaves({"https://test2.com":"/proxy.html"});xdomain.debug = true;
</script>

Here is the log from IE9 (working just fine):

xdomain (https://test.local): proxying request to slave: 'https://test2.com'    xdomain.min.js (Zeile 3)
xdomain (https://test.local): creating iframe xdomain-63e5f960                  xdomain.min.js (Zeile 3)
xdomain (https://test.local): new socket: xdomain-c1595627                      xdomain.min.js (Zeile 3)
xdomain (https://test.local): failed to parse absolute url: file/name.html      xdomain.min.js (Zeile 3)
xdomain (https://test.local): receive socket: xdomain-c1595627: ready           xdomain.min.js (Zeile 3)
xdomain (https://test.local): send socket: xdomain-c1595627: request            xdomain.min.js (Zeile 3)
... (and many more)

Here is, what my FF is logging:

xdomain (https://test.local): proxying request to slave: 'https://test2.com'    xdomain.min.js (Zeile 3)
xdomain (https://test.local): creating iframe xdomain-63e5f960                  xdomain.min.js (Zeile 3)
xdomain (https://test.local): new socket: xdomain-c1595627                      xdomain.min.js (Zeile 3)
xdomain (https://test.local): failed to parse absolute url: file/name.html      xdomain.min.js (Zeile 3)
GET https://test.local/file/name.html                       200 OK      1ms     xdomain.min.js (Zeile 3)
xdomain (https://test.local): Timeout waiting on iframe socket                  xdomain.min.js (Zeile 3)

In the network tab of Firebug, the proxy.html is marked as "aborted".

Am I doing something wrong here, although everything is working in IE9? Is there a fix for that specific FF version?