Comment by 🚀 ingrix
@stack
I reworked the URL parsing code. This version should report present-but-empty queries - at least I can see empty queries when requesting CGI, anyway. It hasn't been tested exhaustively yet to make sure the URL parsing changes didn't violate some assumption I made elsewhere in the main library (tests are broken and need to be fixed), so if you see any strange behavior please let me know. I'll also do more testing tonight. If any important bugfixes are made I'll let you know about that too.
Sep 08 · 3 months ago
10 Later Comments ↓
@ingrix, just deployed it. Looks ok so far. Thanks again
@ingrix, I found the server dead this morning.
unk px connection.c: 370: overflow, buffer sizes need adjustment info c polluxd_cgi.c: 86: cgi helper 113038: cgi request ...
@ingrix, the server has been running for a couple of days (since you provided the latest tarball) prior to crashing.
I set up a cron entry to restart it daily in the meantime.
Let me know if I can do more logging or something that helps.
Looking at the source, it seems to be converting address to string, so kind of strange.
You may want to not abort on things like that, but just close the connection?
@stack thanks for the report, you're probably right that closing the connection makes more sense. I'll get a fix out with that and more asap
@ingrix - is there something like a more traditional log, with a line per request containing time, client address, and full request url? As I have it, the server spits maybe 10 lines of mostly-unhelpful stuff to stderr (I think)
@stack
That has a quick-fix for the issue you're encountering, and the "buffers" have been adjusted to be large enough to hopefully avoid issue. Now it will print "WARNING: peer string is longer than expected..." if address strings exceed expectations - if you can, please let me know if you see any of those so I can figure out what weird case you managed to run in to (I thought I had the math right on those originally but I guess not).
@stack I have the logging set up that way because it helps me figure out what happened if things go wrong in the process, but that's probably less useful for end-users.... The logging does support multiple levels of verbosity so I can make a change to print what you request instead. I worry a bit about spitting out the whole request because on other applications the request may contain e.g. passwords, but I'll figure something out.
@ingrix - perhaps the configuration file can keep an opt-in parameter for logging entire request, defaulting to trim query
@stack I think something like that is a good way to go, let's see how far we get with it. It'll probably take a day or so to get all of the changes put in place the right way, but stay tuned.
@ingrix: I deployed libpxd-c0144d1
No great rush - things that crash are bad, but things like logging format - not so much...
Original Post
New SpellBinding Server — I am happy to announce that, finally, SpellBinding and other games have a dedicated server. After moving the games from tilde to tilde I am looking forward to 100% uptime. Soft open to iron out any remaining issues [gemini link] Let me know if there are any dangling links or anything else ungodly.