diff options
| author | Paul Buetow <paul@buetow.org> | 2026-07-02 00:53:24 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-07-02 00:53:24 +0300 |
| commit | 58602a28d2c92b603208f3e01c14c169d28cc7b0 (patch) | |
| tree | 502d2e187ea29f2cc840e22d299d752d59088a3c /yhttpd/src/msgs.h | |
| parent | 6c3a65b577f002f3219d03498c66205434765179 (diff) | |
yhttpd: port ychat fixes, get it building + stable in Docker (task 9s0)
Ports the ychat revival fixes (unsigned/size_t npos truncation, ofstream
== NULL, tool::trim OOB, CGI popen -> execve, www.yChat.org links, g++
version gate, config.pl -I., NCURSES/CLI-disabled build) so yhttpd builds
on modern GCC in a Rocky Linux 9 container, plus yhttpd-specific fixes
found while verifying it under concurrent load:
- listen() backlog was hardcoded to 1; bumped to SOMAXCONN.
- sock::_close() closed sockets with unread request bytes still in the
kernel receive buffer (read_http() only reads the GET line), so Linux
sent an abortive RST instead of a FIN, racing the client's read of the
response ("connection reset by peer" even though it was delivered).
Fixed with a non-blocking, bounded drain before close() - confirmed via
tcpdump: RSTs on every response before, zero after, across 140+
requests / concurrent bursts of 20.
- Removed a duplicate _make_server_socket() call in start() (wrap.cpp's
init_wrapper() already makes it before start() runs) that leaked a fd
and would have double-initialized SSL if OPENSSL is ever enabled;
caught by fresh-context review, documented honestly in DOCKER.md.
- src/configure's dependency-checker predates 64-bit multilib distros
(only checked /usr/lib, never /usr/lib64) and was missing an ncur
move-aside entry for the NCURSES-disabled build.
Added Dockerfile/.dockerignore/DOCKER.md documenting the build, the fixes,
and the one known-but-unfixed landmine (a SIGILL heap corruption in
sock::_close that reproduces on newer host GCC/glibc but not in the
container - latent, not fixed).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Diffstat (limited to 'yhttpd/src/msgs.h')
| -rw-r--r-- | yhttpd/src/msgs.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/yhttpd/src/msgs.h b/yhttpd/src/msgs.h index fdfb68c..bedf4ec 100644 --- a/yhttpd/src/msgs.h +++ b/yhttpd/src/msgs.h @@ -9,7 +9,7 @@ #define HTTPDFLO "Chat: Flooding (" #define CFILEOK "Parsing config file" #define CFILEFA "Failed opening config file!" -#define CONTACT "Contact: http://www.yChat.org, Mail@yChat.org, ICQ: 11655527" +#define CONTACT "Contact: https://codeberg.org/snonux/ychat, Mail@yChat.org, ICQ: 11655527" #define CLRHTML "HTML: Cleared the document cache " #define CLIWELC "Command Line Interface (type help for a list of all commands)" #define CLIPRMO ">> " @@ -125,9 +125,9 @@ #define XMLER1 "XML Error: Unable to load file " #define VERSION "0.8" #define BRANCH "CURRENT" -#define BUILDNR 4003 -#define UNAME "FreeBSD 5.4-DEVEL-p3 i386" -#define COMPOPT "Using built-in specs.; Configured with: FreeBSD/i386 system compiler; Thread model: posix; gcc version 3.4 [FreeBSD] 20040728; 3.4; g++" +#define BUILDNR 4027 +#define UNAME "Linux 7.0.11-200.fc44.x86_64 x86_64" +#define COMPOPT "16; g++" #define YCUSAGE "Usage: ./yhttpd {h|v}|{o confkey confvalue}\n" #define HEADER1 "HTTP/1.1 200 OK\r\n" |
