Hi,
On Mon, Jun 17, 2013 at 8:41 PM, PS <
peter...@gmail.com> wrote:
> If handshake fails with such error (or handshake was denied by application)
> it definitely should not retry to handshake again as it only results in
> endless loop of handshake attempts, i.e. resembling DDoS attack.
If the websocket handshake fails, CometD falls back to long-polling,
and retries.
> Clients report following issues:
> Error 1: "WebSocket connection to 'ws://
bcs.domain.com' failed: Error during
> WebSocket handshake: 'Sec-WebSocket-Accept' header is missing
> Seen this error by remotely connecting to the client PC. Every browser
> resulted in it. While at the same time my connection in same browsers
> (version of those browsers) was fine. Can some proxy in this particular
> clients internet connection cause this problems?
Likely.
> (it was happening on
> multiple PCs at their household).I am attaching 3 images related to this
> error: regular headers, headers when it fails and failed hadshake message
> object/.
>
> Error 2: "WebSocket connection to 'ws://
bcs.domain.com/bcs' failed:
> Unexpected response code: 400"
> Do not know what to think about this one (temporary service server issue?
> temp server issue along the route? blocked/no allowed protocol on some proxy
> server?)
I think this is due to CometD misconfiguration of WebSocket on server side.
> In jetty log I can see errors related to websockets only when message is too
> long and
> 2013-06-16 18:27:12.189:WARN:oejw.WebSocketFactory:Unsupported websocket
> client version specification <Unspecified, likely a pre-draft version of
> websocket>, configured minVersion [13], reported supported versions [13]
> I am not 100 % sure if users are gracefully redirected to long-polling and
> this last error is transparent to them or not at this time. (could not
> reproduce error myself).
The WebSocket version is unspecified, so it means they are probably
using an old Safari browser.
No solution for this apart upgrade to decent modern browsers.
I have added two tests that remove the Sec-WebSocket-Accept header,
and both the Java client and the JavaScript client behave correctly,
falling back to long polling.