On 08/29/2010 09:08 PM, Amos Jeffries wrote:
By "offset memory" I mean the values from previous runs that HttpParser
stores for offset to various pieces of the request line.
init() reset the overall start/end offsets known for the line, but left
the finer details like start/end offsets in held for method/URL/version at
some random value from a previous run or in the case of a unused
HttpParser, pointing at some random offset in RAM heap space relative to
the about to be processed read buffer.
The random offset would not be possible once init() becomes a
constructor, as it should. Stale finer details is a bug if we reuse
parsers outside of test cases. It feels like we should probably destruct
the parser structure instead of trying to invalidate and then
re-initialize it, but it is your call.
Thank you,
Alex.