Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ionic-framework/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Https SockJS与IE9有问题_Https_Internet Explorer 9_Tornado_Sockjs - Fatal编程技术网

Https SockJS与IE9有问题

Https SockJS与IE9有问题,https,internet-explorer-9,tornado,sockjs,Https,Internet Explorer 9,Tornado,Sockjs,我在这里看到了类似失败的报告:,但我的问题似乎不同 我的设置:客户端连接到https://www.mysite.com/sockjs用于SockJS,实际页面位于https://www.mysite.com/blah/blah/blah。页面上的所有外部元素(如css和js)都使用https,包括SockJS客户端(https://d1fxtkz8shb9d2.cloudfront.net/sockjs-0.3.js,最新版本应为0.3.4)。后端是用SockJS Tornado制作的 问题1:

我在这里看到了类似失败的报告:,但我的问题似乎不同

我的设置:客户端连接到
https://www.mysite.com/sockjs
用于SockJS,实际页面位于
https://www.mysite.com/blah/blah/blah
。页面上的所有外部元素(如css和js)都使用https,包括SockJS客户端(https://d1fxtkz8shb9d2.cloudfront.net/sockjs-0.3.js,最新版本应为0.3.4)。后端是用SockJS Tornado制作的

问题1:我指定使用以下协议:

var options = {protocols_whitelist: ["websocket", "xhr-streaming", "xdr-streaming", "xhr-polling", "xdr-polling", "iframe-htmlfile", "iframe-eventsource", "iframe-xhr-polling"], debug: true};             
conn = new SockJS("https://www.mysite.com/sockjs", options);
然而,IE9似乎只是使用了最差的协议
iframe htmlfile
,正如我在服务器日志中看到的:

INFO:root:200 GET /sockjs/info?t=1353062888578 (127.0.0.1) 0.51ms
INFO:root:200 GET /sockjs/iframe.html (127.0.0.1) 22.21ms
INFO:root:200 GET /sockjs/info?t=1353062888578 (127.0.0.1) 0.51ms
INFO:root:200 GET /sockjs/iframe.html (127.0.0.1) 22.21ms
INFO:root:200 GET /sockjs/info?t=1353062922712 (127.0.0.1) 0.39ms
connection openned for: 127.0.0.1
INFO:root:200 GET /sockjs/info?t=1353062963868 (127.0.0.1) 0.36ms
WARNING:root:Read error on 12: [Errno 104] Connection reset by peer
WARNING:root:error on read
Traceback (most recent call last):
  File "/home/ml/envs/.virtualenvs/sockapp/local/lib/python2.7/site-packages/tornado/iostream.py", line 355, in _handle_read
    if self._read_to_buffer() == 0:
  File "/home/ml/envs/.virtualenvs/sockapp/local/lib/python2.7/site-packages/tornado/iostream.py", line 422, in _read_to_buffer
    chunk = self._read_from_socket()
  File "/home/ml/envs/.virtualenvs/sockapp/local/lib/python2.7/site-packages/tornado/iostream.py", line 403, in _read_from_socket
    chunk = self.socket.recv(self.read_chunk_size)
error: [Errno 104] Connection reset by peer
subject disconnection from: None
Message handled in: 0 ms
INFO:root:200 GET /sockjs/369/rpf1d1vl/htmlfile?c=_jp.aepnvri (127.0.0.1) 60006.30ms
为什么不使用
xdr流媒体
xdr轮询
?在SockJS文档中,它将这两个协议标记在“IE8,9(cookies=no)”下,这是否意味着SockJS仅在浏览器禁用cookies时才会使用它们

问题2:使用协议
iframe htmlfile
,用户将在页面上收到
“仅显示安全内容”的警告,这表明存在混合内容问题。但是,没有其他经过测试的浏览器会报告此警告(例如,Chrome、FireFox、Safari),正如前面提到的,页面上的所有外部资源都是通过https提供的。为什么会这样?它是否与所使用的这个特定协议相关

与此同时,SockJS努力连接到服务器并发送MSG。这是我在服务器日志中看到的内容:

INFO:root:200 GET /sockjs/info?t=1353062888578 (127.0.0.1) 0.51ms
INFO:root:200 GET /sockjs/iframe.html (127.0.0.1) 22.21ms
INFO:root:200 GET /sockjs/info?t=1353062888578 (127.0.0.1) 0.51ms
INFO:root:200 GET /sockjs/iframe.html (127.0.0.1) 22.21ms
INFO:root:200 GET /sockjs/info?t=1353062922712 (127.0.0.1) 0.39ms
connection openned for: 127.0.0.1
INFO:root:200 GET /sockjs/info?t=1353062963868 (127.0.0.1) 0.36ms
WARNING:root:Read error on 12: [Errno 104] Connection reset by peer
WARNING:root:error on read
Traceback (most recent call last):
  File "/home/ml/envs/.virtualenvs/sockapp/local/lib/python2.7/site-packages/tornado/iostream.py", line 355, in _handle_read
    if self._read_to_buffer() == 0:
  File "/home/ml/envs/.virtualenvs/sockapp/local/lib/python2.7/site-packages/tornado/iostream.py", line 422, in _read_to_buffer
    chunk = self._read_from_socket()
  File "/home/ml/envs/.virtualenvs/sockapp/local/lib/python2.7/site-packages/tornado/iostream.py", line 403, in _read_from_socket
    chunk = self.socket.recv(self.read_chunk_size)
error: [Errno 104] Connection reset by peer
subject disconnection from: None
Message handled in: 0 ms
INFO:root:200 GET /sockjs/369/rpf1d1vl/htmlfile?c=_jp.aepnvri (127.0.0.1) 60006.30ms

最后一个错误似乎是超时。当我关闭IE9中的警告对话框时,连接似乎打开了,但之后没有收到来自浏览器的消息(浏览器应在连接打开后立即发送消息)。我想知道这是否与之前的混合内容警告有关

我想我们已经在SockJS邮件列表中找到了您的问题。快速回顾:

问题1-您的服务器要求客户端仅使用执行cookie的传输(出于负载平衡的原因),这意味着无法使用基于XDR的传输(XDR无法执行cookie)

问题2-您忘记在服务器端设置
sockjs_url
参数,以包括来自https(而非http)的sockjs javascript。这就是为什么你有混合的内容警告