3
我使用的是Tomcat websockets
,它在所有瀏覽器中都能正常工作,除了Safari在引發異常響應代碼426錯誤。
我通過網絡督察,並試圖谷歌找到解決這個問題。
但沒有找到任何解決辦法。
我正在使用Safari 5.1.7。任何幫助將不勝感激。
在此先感謝意外的響應代碼426
我使用的是Tomcat websockets
,它在所有瀏覽器中都能正常工作,除了Safari在引發異常響應代碼426錯誤。
我通過網絡督察,並試圖谷歌找到解決這個問題。
但沒有找到任何解決辦法。
我正在使用Safari 5.1.7。任何幫助將不勝感激。
在此先感謝意外的響應代碼426
升級時的426響應代碼適用於您的websocket客戶端不符合WebSocket標準RFC-6455的情況。
參見4.2.2節。發送服務器的打開握手。 http://tools.ietf.org/html/rfc6455#section-4.2.2
/version/
The |Sec-WebSocket-Version| header field in the client's
handshake includes the version of the WebSocket Protocol with
which the client is attempting to communicate. If this
version does not match a version understood by the server, the
server MUST abort the WebSocket handshake described in this
section and instead send an appropriate HTTP error code (such
as 426 Upgrade Required) and a |Sec-WebSocket-Version| header
field indicating the version(s) the server is capable of
understanding.
這是怎麼回事,是系統的Safari 5.x沒有使用最後的WebSocket規範,而是一個早期試驗版本草案,一些Tomcat不正確支持。幾乎沒有生產服務器了。
欲瞭解更多信息,請參閱What browsers support HTML5 WebSocket API?和http://caniuse.com/websockets