On 23/08/2016 9:26 p.m., Eduard Bagdasaryan wrote:
> 2016-08-23 3:08 GMT+03:00 Alex Rousskov:
> 
>> I do not understand why you decided to use maxMethodLength in
>> parseRequestFirstLine(). AFAICT, parseMethodField() already does
>> everything we need: It logs an error message and sets parseStatusCode
>> accordingly.
> 
> Yes, it does partly what we need but it does not parse the delimiter(
> and inform about possible failure). skipDelimiter() does this with
> message:
> 
>> invalid request-line: missing delimiter
> 
> which does not hint that our case is a 'bad' method and
> less informative than:
> 
>> invalid request-line: method exceeds 32-byte limit
> 
> Probably this does not make much sense, so I followed your
> sketch and refreshed the patch.

A followup patch can be done to give skipDelimiter a 'const char* which'
parameter that takes a description/name for the delimiter to improve
that debug output.

so:
  skipDelimiter(blah, "method")

produces:
 invalid request-line: missing method delimiter


Amos

_______________________________________________
squid-dev mailing list
[email protected]
http://lists.squid-cache.org/listinfo/squid-dev

Reply via email to