💾 Archived View for bbs.geminispace.org › u › skyjake › 1524 captured on 2023-07-22 at 17:57:54. Gemini links have been rewritten to link to archived content

View Raw

More Information

➡️ Next capture (2023-09-08)

-=-=-=-=-=-=-

Re: "Certain servers are too hasty to respond"

Comment in: s/Gemini

Yeah, this topic is good to note if you're writing a server. Dealing with sockets isn't quite as simple as one would like/expect.

While writing my server I found you will need to read until a CRLF is received (up to 1024 bytes), the client terminates the connection, or there's a timeout because the client never finishes writing a proper request. This timeout situation seems to happen more often than you'd think. If not handled properly, your server will eventually hang waiting for requests to complete.

🚀 skyjake

2023-06-04 · 7 weeks ago

2 Later Comments ↓

🤖 alexlehm

Funny enough, I had an issue like that when writing a misfin server in Java and handled the data received from the socket as it appeared and didn't wait for the \r\n to finish

2023-06-05 · 7 weeks ago

🦀 jeang3nie

Nice detective work there. That would be a great thing to mention in a "best practices" document for implementors.

Original Post

🌒 s/Gemini

— Here's a capsule that's failing to load in Rosy Crow due to this issue

Certain servers are too hasty to respond — A few servers, when visited in Rosy Crow, will respond with an Invalid URL error. This problem had been a head-scratcher for a bit, but I've found the cause: some servers don't wait for the client's request to finish before they respond to it. The root cause is the result of how the Opal client library makes requests. In order to...

💬 Addison · 3 comments · 2023-06-04 · 7 weeks ago