Commit Graph
20 Commits
Author SHA1 Message Date
Brad ArantandClaude Sonnet 5 a033cc6718 Add StreamReader and rebuild Parser/LineParser/IMFHeader/IMFBoundary on it
Introduces StreamReader to accumulate socket data delivered in arbitrary
chunks into one buffer, so a Parser can build an object (a line, a header
block, a MIME boundary) that spans any number of packets without losing
its place. Parser is redesigned around this: no longer inherits MString
(was redundant with its own buffer member), takes a StreamReader&, and
drives a resumable COMPLETE/INCOMPLETE/DATA_AVAIL state-machine protocol
via doParse(). LineParser, IMFHeader, and IMFBoundary are rewritten as
real, working resumable parsers against the shared buffer instead of the
previous non-compiling stubs (mismatched constructors/return types, a
syntax error, checkParse() never implemented).

IMFFormData is left as the stub it already was, just restored to
compiling against the new IMFHeader signature - fully wiring it up needs
IMFMultipart/IMFText migrated to StreamReader too, out of scope here.

Verified with real runtime tests (not just compilation) covering data
split mid-line, mid-CRLF, mid-header-fold, and mid-boundary-marker across
separate feed() calls, plus StreamReader::compact(). Along the way fixed
a header-value bug (space after ':' wasn't skipped) and a double
cursor-offset subtraction bug in two places caused by forgetting that
ZString::getLength() is already cursor-relative, not the raw buffer size.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-23 14:25:58 -07:00
Brad Arant d415e0abd3 Still working out parsing buffer stuff. 2025-12-18 15:40:37 -08:00
Brad Arant ccfab5aecf Still working out parsing buffer stuff. 2025-12-17 17:07:14 -08:00
Brad Arant 9cd8381845 significant work on cookies and cgi formdata variables. 2025-03-18 16:46:20 -07:00
Brad Arant bd5223ca36 more cgi processing multiform work. 2025-03-17 16:45:34 -07:00
Brad Arant 2866056072 more IMF work. 2025-03-11 16:59:16 -07:00
brad Arant fd7a9ed860 some smart buffer work. 2025-03-11 07:34:17 -07:00
brad Arant 11f396a749 worked on IMF smartbuffers. 2025-02-21 13:22:57 -08:00
Brad Arant 01180021b4 Work on the IMFHeader and IMFMessage. 2024-11-11 15:58:58 -08:00
Brad Arant a37c4e6829 Updated and working. 2022-01-24 14:03:58 -08:00
Brad Arant d4148b0ab4 Optmizations for IMF objects. 2021-09-23 16:30:33 -07:00
barant ff2c2b7432 All sorts of new crap and adjustments 2021-07-23 11:44:36 -07:00
Brad Arant b6f4bf8a71 Got it compiling and somewhat working, except post. 2020-11-29 13:58:17 -08:00
Brad Arant 41852d019c Sync. 2020-11-16 17:00:28 -08:00
barant 4b6d455689 Sync. 2020-10-27 14:41:06 -07:00
barant 4f95b4591b sync. 2020-08-05 11:57:35 -07:00
barant f4496fc682 Continued refinement of IMF objects. 2020-05-04 10:02:52 -07:00
barant 947eef21e2 Continued work. 2020-03-03 15:46:24 -08:00
barant 08169b1c3d Many additions and changes. 2019-09-13 10:29:36 -07:00
barant 604e196fbb Initial repository load. 2019-07-10 14:19:33 -07:00