缺少 WebSocket 'Connection'标头



我正在尝试从客户端连接到Intersystems Cache CSP Websocket:

var ws = new WebSocket("ws://" + window.location.host + "/path/ClassName.cls");

和我得到这个错误在chrome控制台:

WebSocket connection to 'ws://<server address>' failed: Error during WebSocket handshake: 'Connection' header is missing

请求头:

Accept-Encoding:gzip, deflate, sdch
Accept-Language:en-US,en;q=0.8,he;q=0.6
Cache-Control:no-cache
Connection:Upgrade
Cookie:CSPWSERVERID=Cache for Windows (x86-64) 2013.1.1 (Build 501_1_13062) Sun Aug 11 2013 23:20:33 EDT
Host:<host-ip>
Origin:http://<host-ip>
Pragma:no-cache
Sec-WebSocket-Extensions:permessage-deflate; client_max_window_bits
Sec-WebSocket-Key:<the key>
Sec-WebSocket-Version:13
Upgrade:websocket
User-Agent:Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.125 Safari/537.36

和响应头:

Date:Tue, 04 Aug 2015 11:45:54 GMT
Sec-WebSocket-Accept:<some key>
Sec-WebSocket-Protocol:chat
Server:Microsoft-IIS/7.5
Transfer-Encoding:chunked
Upgrade:websocket
X-Powered-By:ASP.NET

服务器正在使用IIS 7.5,技术上不支持WebSocket,但似乎所有的WebSocket头确实都在适当的位置,除了一个:" Connection":"Upgrade"。

是否有办法注入"连接"头到握手响应?是否有一些客户端配置可以忽略丢失的标头?

谢谢。

不幸的是,对于WebSockets支持,您需要IIS 8 + Windows 8和Windows Server 2012

http://docs.intersystems.com/cache20152/csp/docbook/DocBook.UI.Page.cls?KEY=GCGI_oper_config GCGI_websockets

相关内容

  • 没有找到相关文章

最新更新