mighty-gerbils / gerbil

Gerbil Scheme
https://cons.io
GNU Lesser General Public License v2.1
1.13k stars 111 forks source link

Fixes to JSON-RPC and WebSocket clients #1189

Closed belmarca closed 2 months ago

belmarca commented 3 months ago

Some JSON-RPC servers do not accept Content-Type: application/json-rpc. The programmer must now specialize their code for their own uses.

The WebSocket client was wrongly terminating when the server did not respond with a Sec-Websocket-Version header. Our logic was flawed and we now fail when it is present. See https://datatracker.ietf.org/doc/html/rfc6455#section-4.4.

netlify[bot] commented 3 months ago

Deploy Preview for elastic-ritchie-8f47f9 ready!

Name Link
Latest commit 8957428e36da1afd5b4c60f649337327b369a844
Latest deploy log https://app.netlify.com/sites/elastic-ritchie-8f47f9/deploys/6619b7a6e5f8bc00088806e9
Deploy Preview https://deploy-preview-1189--elastic-ritchie-8f47f9.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

fare commented 3 months ago

The tests fail:

*** ERROR IN "net/websocket/client.ss"@76.26-76.43 [IOError]: bad server response; unsupported websocket version
--- irritants: websocket-connect ("Sec-Websocket-Version" . "13") 
fare commented 2 months ago

I rebased the branch, added the docs I asked for, and fixed the server.