]> git.ipfire.org Git - thirdparty/squid.git/commit - src/cf.data.pre
Clarify http_port mode options and enhance config validation.
authorAmos Jeffries <squid3@treenet.co.nz>
Thu, 22 Apr 2010 09:15:02 +0000 (21:15 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 22 Apr 2010 09:15:02 +0000 (21:15 +1200)
commitc7b1dd5d377a3cd748cf48dde9cfa12e1fb5f3df
treec278e94ea7760dc3d69cb95f0f2063f3619b3ec2
parentd0de3f626e08bc838195a5af85e4c4d10f22a7d7
Clarify http_port mode options and enhance config validation.

This 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 emitted on failure
are clear enough for people to follow easily.
src/cache_cf.cc
src/cf.data.pre