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

Amos Jeffries squid3 at treenet.co.nz
Wed Aug 24 14:30:41 UTC 2016

On 25/08/2016 12:36 a.m., Eduard Bagdasaryan wrote:
> 2016-08-23 18:01 GMT+03:00 Alex Rousskov:
>> invalid request-line: missing delimiter before "HTTP/1"
> In order to generate "where" with such detalization (i.e. the specific
> protocol version or method) we would need to pass skipDelimiter() the
> parsed AnyP::ProtocolVersion or HttpRequestMethod objects, which would
> require converting skipDelimiter() to a template:
>   <template class C> skipDelimiter(size_t, const char *where, const C
> &what);

Two options there;

Option 1, is to use a fixed and slightly generic where message:
   "before protocol version"

  Pros: static debugs message, only used when actually needed.

  Cons: its generic rather than protocol specific.

Option 2, is to use a PackableStream to construct that part of debug
message in advance.

  Pros: its accurate and detailed

  Cons: extra memory and time required to generate the string when its
probably never used.

I think go with option 1 since this is a performance critical piece of code.


More information about the squid-dev mailing list