When setting username and password with the --rpc-user and --rpc-passwd commandline arguments, I have no idea how to authenticate a WebSocket connection. How does one do this?
WebSocket RFC 6455 says that it can use HTTP authorization mechanism in WebSocket handshake.
WebSocket handshake is in fact HTTP protocol, so it can be done.
But at the time of this writing, it seems only Firefox supports this.
I checked Iceweasel 10 (which is Debian counterpart of Firefox 10): when I connected to aria2 via WebSocket, the browser asked me username and password. I entered them and authentication seemed to pass but the WebSocket protocol the browser support is too old and aria2 refused to accept the connection.
At the moment, Google Chrome does not support HTTP authorization in WebSocket entirely.
Here is Chrome bug: http://code.google.com/p/chromium/issues/detail?id=123862
I'll just leave the rpc open for now, then. Thanks for the help, and for a great program.
seems to work in Firefox 13.01 and 15 (nightly) with webui-aria2 although I don't know how to tell if its using websocket or just http.
Thank you for additional info.
One way to know whether WebSocket is used or not is inspect aria2's log file.
If each RPC request comes with HTTP request header, then it is normal HTTP. Otherwise it is WebSocket.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.