[PATCH] [RFC] Enforce separate http_port modes

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Wed, 21 Apr 2010 02:44:15 +0000

This patch makes some changes to the config validation of http_port lines
and documentation of http_port.

It alters documentation to call accel, tproxy, intercept, and sslbump
options "mode flags" since they determine the overall code paths which
traffic received is handled by.

The http_port syntax docs are updated to show that mode flags must go
first before any options. This is not strictly true, since the mode flag
only must go before mode-specific options. But its clearer to explain the
syntax docs like this. Both mode and options remain completely optional
(except that some options require certain modes as before).

The parser is updated to validate that only one of the mode flags is used.
Attempts to mix them will result in a fatal error. Attempts to use any of
the mode-specific options without the correct mode being enabled first will
result in a fatal message.

As a side-effect of this the implicit enabling of accel on several of its
options has been dropped. Explicit use as mode flag is preferred (and
required) instead for clear reading of the config.

Implications for older configs are that the http_port may fail a parse
check until some basic re-ordering of options or splitting of http_port
into multiple entries is done. Hopefully the messages omitted on failure
are clear enough for people to follow easily.

Slightly related future work;
  adding a "ssl" mode flag to http_port and merging the https_port
directive as just another mode of http_port.

Amos

Received on Wed Apr 21 2010 - 02:44:22 MDT

This archive was generated by hypermail 2.2.0 : Thu Apr 22 2010 - 12:00:08 MDT