|
Cro: libraries and tools for building reactive services in Perl 6 | cro.services/ | Logs: irclog.perlgeek.de/cro/ Set by moderator on 21 May 2018. |
|||
|
01:58
ilbot3 joined
|
|||
| moderator | Cro: libraries and tools for building reactive services in Perl 6 | cro.services/ | Logs: irclog.perlgeek.de/cro/ | ||
|
02:27
lizmat joined
14:21
Zoffix joined,
Zoffix left
14:22
Qwerasd joined
|
|||
| Qwerasd | Hi, how exactly would I go about providing a certificate for Cro::WebSocket::Client.new when using a WSS? | 14:23 | |
| jnthn | Hmm, I wonder why it wants that...it should probably just use the default cert store | 15:09 | |
| Can probably just pass something bogus like ca => { :none } | 15:10 | ||
| Qwerasd | i.imgur.com/AC8tokV.png still yields "Cannot connect through wss without certificate specified" | 15:12 | |
| jnthn | Needs passing to connect, not to new | 15:13 | |
| Qwerasd | huh? | ||
| Oh lol. | 15:14 | ||
| Thanks | |||
|
16:24
lizmat joined
21:21
Qwerasd joined
|
|||
| Qwerasd | Hm... Using Cro::Websocket::Client the connection returns 404 not found, however testing an in-browser implementation shows the URL in question working fine. | 21:30 | |
| jnthn | Stick CRO_TRACE=1 in the environment to debug what's actually being sent | 22:08 | |
| Qwerasd | Is the only way of establishing websocket connections via an HTTP GET initially? The websocket url I;m trying to connect to doesn't have an http service associated with it. | 22:14 | |
| jnthn | The websocket RFC specifies its initial handshake as a GET request | 22:17 | |
| Qwerasd | I'm not sure what's differing between the browser implementation and the Cro implementation then. | 22:18 | |
| jnthn | See tools.ietf.org/html/rfc6455#section-1.3 | ||
| Qwerasd | As I've said it connects fine through a browser. | ||
| jnthn | Yeah, not sure either. There's various things I can imagine going wrong, but a 404 I don't have a good guess at besides "it really is requesting the wrong target" | 22:19 | |
| We've had the odd issue where we weren't so lax on interpreting the upgrade headers the server sent back as would be desired | 22:20 | ||
| But that wouldn't look like a 404 | 22:21 | ||
| Qwerasd | Btw using CRO_TRACE it is indeed sending back a 404. | ||
| jnthn | Does the target of the request look correct? | 22:22 | |
| (The thing right after the GET) | |||
| Qwerasd | From what I can tell, yes. | ||
| Analyzing the browser's requests I see the browser isn't specifying a Sec-WebSocket-Protocol header, though I don't see how that would affect anything. | 22:24 | ||
| For reference the WSS I'm trying to connect to is wss://gateway.discord.gg | |||
| jnthn | Me either, and 404 would be a very odd response if it didn't like that | 22:26 | |
| Qwerasd | The connection I'm using is (Cro::WebSocket::Client.new: uri => 'wss://gateway.discord.gg').connect(ca => { :none }) | 22:31 | |
| jnthn | OK. I should sleep soon, but will see if I can find a moment to try it tomorrow. | 22:35 | |
| Qwerasd | Thanks. | ||
|
23:15
Qwerasd joined
|
|||