summaryrefslogtreecommitdiff
path: root/yhttpd/src/sign.cpp
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-06-30 10:40:53 +0300
committerPaul Buetow <paul@buetow.org>2026-06-30 10:40:53 +0300
commit2adb923d328d7a9a5fb6618269cd42d2cd692a84 (patch)
tree059495dbe1da54c2f0f1f5f584ec5fa78995a9f8 /yhttpd/src/sign.cpp
parent563d4d29f9cdceec48f84666bdc1eebb1d2f70f5 (diff)
sock: read full request across segments (fix POST body behind proxy)
handle_client_read did a single read() and assumed the whole request (headers + POST body) arrived in one packet. Behind a reverse proxy (Traefik) the body is forwarded in a separate TCP segment, so the form params (event/nick/tmpid/...) were never parsed: logins silently no-op'd, the frameset was served with tmpid= (empty), and every frame hit 'Session: Could not find session' -> 502 in all frames. Now accumulate into c_buf across re-arms of the read event (track i_buf_len in the context), drain non-blocking until EAGAIN, and for POST wait until the headers AND the full Content-Length body are present before parsing. EOF/empty and hard read errors are handled without crashing.
Diffstat (limited to 'yhttpd/src/sign.cpp')
0 files changed, 0 insertions, 0 deletions