[squid-dev] [PATCH] Incorrect processing of long URIs

Amos Jeffries squid3 at treenet.co.nz
Tue Aug 23 14:08:27 UTC 2016


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



More information about the squid-dev mailing list