Refused to set unsafe header "Connection"

131 views
Skip to first unread message

Prutkar

unread,
Dec 7, 2009, 7:39:13 PM12/7/09
to cometd-dev
I am using Jetty 6.1.17, cometd-1.0.beta10, dojo-toolkit client - I am
testing demo chat application and all is working fine, except:

Safari under Windows prints errors into the console:
Refused to set unsafe header "Connection"

This is still alright as javascript continues to execute, but on
iphone Safari browser this error is a showstopper.
(I know I am not setting the header "Connection"in my code.)

Is there anybody who can advice on this?

Prutkar

unread,
Dec 8, 2009, 12:33:20 AM12/8/09
to cometd-dev
I found out in org/cometd.js following code:

org.cometd.LongPollingTransport = function()
...
headers: {
Connection: 'Keep-Alive'
},
...
};


Commenting out lines that set header Connection solved problem and
removed above mentioned error. Now, I understand that with long-
polling we want to keep connection alive, so, is this "cometd bug" or
"Safari bug" or "Safari feature"?

Simone Bordet

unread,
Dec 8, 2009, 2:40:02 PM12/8/09
to comet...@googlegroups.com
Hi,
http://bugs.cometd.org/browse/COMETD-22

Simon
--
http://bordet.blogspot.com
---
Finally, no matter how good the architecture and design are,
to deliver bug-free software with optimal performance and reliability,
the implementation technique must be flawless. Victoria Livschitz
Reply all
Reply to author
Forward
0 new messages