Re: [RFC] %Sf to log request state flags

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Sun, 12 Jun 2011 19:28:41 +1200

On 21/05/11 12:28, Amos Jeffries wrote:
> On 21/05/11 03:58, Alex Rousskov wrote:
>> On 05/20/2011 08:56 AM, Amos Jeffries wrote:
>>> I'm now looking at adding %Sf code to log the handling flags Squid works
>>> with for modes etc.
>>>
>>> Anyone have ideas on exact what to put in the log?
>>> coded characters? (one, two, a whole word?)
>>
>> Can you give a few examples of what you call the handling or state flags?
>
> src/HttpRequestFlags.h
>
> The "mode" and type ones (accel, tproxy/spoof, intercepted, transparent,
> sslbump, internal, ims, range) and the major behaviour indicators
> (redirected, cacheable, nocache, ignore_cc, auth, loopdetect,
> chunked_reply, stale, adapted).
>
> Thats probably no all we will want to log, but the ones that stand out
> right now as needing a mention.
>
> Amos

I've broken that into three groups. One about the traffic "mode" type,
one about what we do during HTTP handling, and one about what happens
durign teh optionl adaptations.

Going through the list of things done and flags floating around. Also
assuming one character per flag I get this:

BNF form:

  squid-flags ::= port-mode '-' http-alt [ '-' adapts ]

  port-mode ::= 'P' [ 'a' | 'f' | 'I' | 'i' | 's' | 't' | 'z' ]

  http-alt ::= 'H' [ 'l' | 'm' | 'o' | 'r' | 'u' | 'z' ]+

  adapts ::= 'A' [ 'E' | 'e' | 'i' | 's' | 'w' | 'x' | 'z' ]+

port-mode tags meaning:

  a - accel / reverse
  f - default / forward
  I - internal request
  i - interception (NAT)
  s - spoofing (TPROXY)
  t - transparent (HTTP definition)
  z - encrypted traffic

http-alt tags meaning:

  l - loop detected
  m - HTTP mangling adaptations (non-violation changes)
  o - ignore client Cache-Control
  r - HTTP Redirect by Squid (not by origins)
  u - HTTP Upgrade (1.0->1.1 required changes, etc)
  v - HTTP protocol violation
  z - HTTP transfer encoding mux (chunking etc)

adapts tags meaning:

  E - ESI constructed reply
  e - eCAP adapted
  i - ICAP adapted
  s - SSL bump
  w - URL re-write
  x - cross-protocol gateway (FTP->HTTP, Gopher->HTTP, etc)
  z - encrypted / decrypted (ie gzip)

Amos

-- 
Please be using
   Current Stable Squid 2.7.STABLE9 or 3.1.12
   Beta testers wanted for 3.2.0.8 and 3.1.12.2
Received on Sun Jun 12 2011 - 07:28:48 MDT

This archive was generated by hypermail 2.2.0 : Thu Jun 16 2011 - 12:00:04 MDT