Re:Show HN: Micro HTTP server in 22 lines of C
by nly on Saturday July 31, 2021 @07:46PM
(#28022431)
Are you handling the obs-fold? Because this is something the joyent parser falls over at (a streaming parser must buffer the obs-fold to disambiguate). I don't see it in your code. If you handle it your parser can't be O(1) space.
See the remark at the bottom of the Boost Beast parser docs for a hint at the trade off here:
See the remark at the bottom of the Boost Beast parser docs for a hint at the trade off here:
https://www.boost.org/doc/libs/1_75_0/libs/beast/doc/html/be...
I think the implementation is gold standard:
https://github.com/boostorg/beast/blob/develop/include/boost...