From: Christos Tsantilas Date: Tue, 24 Sep 2019 10:04:05 +0000 (+0000) Subject: Bug 4987: restore support for the "cache_object://" URI scheme (#475) X-Git-Tag: SQUID_5_0_1~36 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=091213e61e8fe047cef022a3867afff1feb0c28c;p=thirdparty%2Fsquid.git Bug 4987: restore support for the "cache_object://" URI scheme (#475) Broken by commit 6c880a1. --- diff --git a/src/anyp/Uri.cc b/src/anyp/Uri.cc index a8e49f1b19..e42f7c6c02 100644 --- a/src/anyp/Uri.cc +++ b/src/anyp/Uri.cc @@ -142,8 +142,15 @@ uriParseScheme(Parser::Tokenizer &tok) * Scheme names consist of a sequence of characters beginning with a * letter and followed by any combination of letters, digits, plus * ("+"), period ("."), or hyphen ("-"). + * + * The underscore ("_") required to match "cache_object://" squid + * special URI scheme. */ - static const auto schemeChars = CharacterSet("scheme", "+.-") + CharacterSet::ALPHA + CharacterSet::DIGIT; + static const auto schemeChars = +#if USE_HTTP_VIOLATIONS + CharacterSet("special", "_") + +#endif + CharacterSet("scheme", "+.-") + CharacterSet::ALPHA + CharacterSet::DIGIT; SBuf str; if (tok.prefix(str, schemeChars, 16) && tok.skip(':') && CharacterSet::ALPHA[str.at(0)]) {