[squid-dev] Incremental parsing of chunked quoted extensions
Eduard Bagdasaryan
eduard.bagdasaryan at measurement-factory.com
Thu Oct 4 18:30:27 UTC 2018
Hello all,
There is a bug in Squid during incremental parsing of quoted chunked
extensions, resulting in unexpected throwing in
One::Parser::skipLineTerminator(). The underlying problem comes from
the fact that Http::One::Tokenizer::qdText() cannot parse
incrementally because it cannot distinguish "an invalid input" from
"need more data" case.
I see two approaches for fixing this problem:
* Low-level.
Supply Parser::Tokenizer and its children with incremental parsing
functionality. It looks like this would require much non-trivial work.
* High-level.
Avoid incremental parsing of chunked extensions and parse them all
at once. In other words, we need to adjust the Tokenizer caller
to buffer the whole chunk extension line before passing it to the
Tokenizer in order to avoid "need more data" case, causing that bug.
Is the incremental parsing of chunked extensions all-important here?
If no, can I proceed with (2) approach fixing this bug?
Thanks,
Eduard.
More information about the squid-dev
mailing list