[rabbitmq-discuss] twiddling with rabbitmq-http2 on windows

Juhani Ränkimies juhani at juranki.com
Fri Jul 10 20:17:34 BST 2009


Here's a dirty workaround for this problem. This is NOT a solution.
Use only in your development env and if you absolutely need it, until
the bug gets fixed in FF/FB.

diff -r 7ab764d1ca27 server_root/htdocs/prototype-1.4.0.js
--- a/server_root/htdocs/prototype-1.4.0.js	Mon Feb 02 12:34:17 2009 +0000
+++ b/server_root/htdocs/prototype-1.4.0.js	Fri Jul 10 21:45:38 2009 +0300
@@ -641,8 +641,13 @@
         this.options.asynchronous);

       if (this.options.asynchronous) {
-        this.transport.onreadystatechange = this.onStateChange.bind(this);
-        setTimeout((function() {this.respondToReadyState(1)}).bind(this), 10);
+           if (/Firefox\/3.5/.test(navigator.userAgent)){
+               var xhr = this.transport;
+               xhr.onload = xhr.onerror = xhr.onabort =
this.onStateChange.bind(this);
+           } else {
+               this.transport.onreadystatechange =
this.onStateChange.bind(this);
+           }
+           setTimeout((function()
{this.respondToReadyState(1)}).bind(this), 10);
       }

       this.setRequestHeaders();




On Fri, Jul 10, 2009 at 7:25 PM, Juhani Ränkimies<juhani at juranki.com> wrote:
> This bug is the cause of the problem with firefox/firebug:
>
> http://www.nczonline.net/blog/2009/07/09/firefox-35firebug-xmlhttprequest-and-readystatechange-bug/
>
> -juhani
>
> On Wed, Jul 8, 2009 at 7:31 PM, Juhani Ränkimies<juhani at juranki.com> wrote:
>>
>> The examples work with recent versions of Chrome, Safari and Firefox.
>>
>> But when I enable firebug, Firefox starts to behave strangely.
>>
>




More information about the rabbitmq-discuss mailing list