Hello, A umask port from Squid2 discovered that Squid3 parses squid.conf file integers as decimal numbers while Squid2 honors 0 and 0x prefixes (indicating octal and hex numbers). The later functionality is needed for things like unmask that are traditionally specified using octal format.
The change to honor other integer bases was introduced in Squid2 before 2005/05/17. I failed to track the commit that did it, unfortunately. The cache_cf.c file was changed in Squid2 HEAD as the result of this: > revision 1.422 > date: 2005/05/17 16:56:37; author: hno; state: Exp; lines: +285 -209 > Reset Squid-2 HEAD to the current state of Squid-2.5 to reduce confustion > > the old Squid-2 HEAD is available as the branch OLD_SQUID_2_6 if needed. My patch changes Squid3 behavior to match that of Squid2. The alternative is to add a new "base_integer" type to squid.conf. That type would honor prefixes while the current "int" type will not. However, if Squid2 did not significant problem with flexible integer parsing, Squid3 should be OK as well. Also, such a subtle difference between the two configurations would make upgrading more difficult for those rare cases where an admin used a non-decimal integer in squid.conf for things other than umask (on purpose or by accident). I doubt bzr managed to generate a proper bundle, even though I did follow instructions and did _not_ commit before running the two commands below. I have no idea why bzr send did not work and --verbose does not produce more info. bzr diff -r submit: | less bzr send [EMAIL PROTECTED] To compensate, I am quoting the one-line patch below. Thank you, Alex. === modified file 'src/Parsing.cc' --- src/Parsing.cc 2007-08-13 23:20:50 +0000 +++ src/Parsing.cc 2008-04-02 15:51:03 +0000 @@ -89,7 +89,8 @@ if (token == NULL) self_destruct(); - if (sscanf(token, "%d", &i) != 1) + // %i honors 0 and 0x prefixes, which are important for things like umask + if (sscanf(token, "%i", &i) != 1) self_destruct(); return i;
# Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: [EMAIL PROTECTED] # target_branch: http://squid-cache.org/bzr/squid3/trunk/ # testament_sha1: ad975efd6bd833665a8da38047f2fafcd03cb80a # timestamp: 2008-04-02 10:10:59 -0600 # base_revision_id: [EMAIL PROTECTED] # f7d73mbt5kcbrmt4 # # Begin patch # Begin bundle IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWYUFw0YAABHfgAAQQGFzUBIA AACv794QIABkRR6nqaep6gZPUA9IxCjJqaBo09JpgjIMQ3m0vN/kfmJsLk0MHQ1W4qiRcX7dBKNJ lorThQidj3YxTykvD4J5hd1FQti/6hzQ9gCghgPfGQ8nyFtaDiAA5JCZ68iW34u5IpwoSEKC4aMA