Re: Propose to polish the consistency of case sensitivity in configurations

From: Alex Rousskov <rousskov_at_measurement-factory.com>
Date: Tue, 29 Jan 2013 13:21:00 -0700

On 01/29/2013 01:49 AM, Tianyin Xu wrote:

> 3. For configuration like A B=C, A and B should be sensitive while C
> should be insensitive.

The case sensitivity of squid.conf directive parameters (i.e., all the
stuff that follows the directive name) depends on the directive. Many C
values are case-sensitive (e.g., various locations). However, you should
not see a lot of str*cmp() code applied to those values -- if that is
how you plan locating code for planned consistency fixes.

We can probably declare all known names such as directive names and
directive parameter names case-insensitive. That would make their
handling consistent and backward compatible. However, that "permissive"
direction feels inconsistent with recent changes that, among other
things, restricted the variation of "positive" keywords such as "on",
"enabled", and "yes".

Other than consistency with some existing options, I do not see value in
making configuration names case-insensitive (unless required so by some
communication protocol, of course). Variations in case just make configs
messier IMO. If we were to start from scratch, I would argue that all
known configuration names should be case sensitive.

I find it interesting that squid.conf.documented does not document
default case sensitivity. Perhaps we can use that to justify making
everything sensitive by default? :-)

HTH,

Alex.
Received on Tue Jan 29 2013 - 20:21:06 MST

This archive was generated by hypermail 2.2.0 : Wed Jan 30 2013 - 12:00:08 MST