Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.6.0, 5.8.0
-
None
-
Qt 5.8, ubuntu, running behind cloud9 proxy.
Description
qwebsockethandshakerequest.cpp at line 257 should not abort on an empty header value...
I'm trying to use websockets on cloud9, and for some reason their proxy connection inserts an empty cooke header field:
GET / HTTP/1.1
Host: XXXXX-YYYYY.c9users.io:8082
pragma: no-cache
cache-control: no-cache
origin: http://XXXXX-YYYYY.c9users.io
sec-websocket-version: 13
user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36
dnt: 1
accept-encoding: gzip, deflate, sdch
accept-language: en-US,en;q=0.8
cookie:
sec-websocket-key: Kq7mkf/67hvRdvNF5an0qg==
sec-websocket-extensions: permessage-deflate; client_max_window_bits
x-forwarded-proto: http
x-forwarded-port: 80
x-forwarded-for: 127.0.0.1, 10.240.0.119
X-Forwarded-Host: XXXXX-YYYYY:8082
X-Forwarded-Server: XXXXX-YYYYY.c9users.io
Upgrade: WebSocket
Connection: Upgrade
when the empty cookie field is encountered, the handshake silently fails and does not set an error and does not disconnect, so eventually the browser client times out on the handshake.
Ideally a handshake failure here would disconnect and set an error. But also, an empty header field should not be an error... for instance in this case I don't have control over what headers cloud9 chooses to proxy or strip or insert.
For this implementation, I'm now using apache2 proxy_wstunnel and stripping the empty cookie header with a "RequestHeader unset cookie" in the config to get it working.