[squid-dev] [PATCH] suffix parsing and skipping

Alex Rousskov rousskov at measurement-factory.com
Wed Jul 22 22:41:44 UTC 2015


Hello,

    The attached patch adds SBuf and Tokenizer methods to simplify
suffix parsing and skipping (and to make suffix/reverse APIs more
similar to prefix/forward ones). The new methods are used in another
patch (to be posted shortly) that makes the request line parser simpler
and more robust, but they are useful in other contexts as well IMO.

For consistency sake, I tried to mimic the existing Tokenizer/SBuf
documentation, debugging, and code duplication styles.


One old problem was detected and documented during this project: The
Tokenizer::parsedSize() method does not account for the successfully
parsed and removed suffix/trailing characters in most cases. That method
should be revised or removed. Solving this problem is outside this
project scope.


This and the following patch are based on trunk r14083. I will update to
the current trunk if the patches are approved. Please let me know if you
want to review the updated versions as well.


HTH,

Alex.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: parse-tail-t2.patch
Type: text/x-diff
Size: 14871 bytes
Desc: not available
URL: <http://lists.squid-cache.org/pipermail/squid-dev/attachments/20150722/14f89c95/attachment.patch>


More information about the squid-dev mailing list