[squid-dev] [PATCH] suffix parsing and skipping
Alex Rousskov
rousskov at measurement-factory.com
Thu Jul 23 15:18:31 UTC 2015
On 07/23/2015 09:08 AM, Amos Jeffries wrote:
> On 24/07/2015 1:55 a.m., Alex Rousskov wrote:
>> On 07/23/2015 01:46 AM, Kinkie wrote:
>>
>>> the only thing I don't understand is the XXX in
>>> parsedSize(); it's not clear why the comment,
...
>>> as soon as that's improved, +1.
>> Why?! This is not something the patch breaks. Do you want me to remove
>> the XXX and just pretend that we have not discovered the problem?
> The reverse-parse bytes is not worth accounting in current trunk code
> because the incremental HTTP Parser is always using its primary
> Tokenizer forwards. The special-case reverse-parse uses a separate
> temporary Tokenizer is only used on a sub-section of line accounted for
> by the LF seek pass.
>
> That changes if the proposed Parser refactor Alex has in parallel gets
> merged.
That does not change. This discussion ought to be completely out of this
thread scope, but the proposed parser refactoring still uses forward
parsing as far as any parseRequestFirstLine() caller is concerned:
Http::One::RequestParser::parseRequestFirstLine()
{
::Parser::Tokenizer lineTok(buf_);
if (!lineTok.prefix(line, lineChars) || !lineTok.skip('\n')) {
debugs(74, 5, "Parser needs more data");
return 0;
}
... code not touching lineTok or buf_ here ...
parseStatusCode = Http::scOkay;
buf_ = lineTok.remaining(); // incremental parse checkpoint
return 1;
}
Alex.
More information about the squid-dev
mailing list