more circumstances than squid-2 idle connections were. They are
also spread over all IPs of the peer.
+ <tag>configuration_includes_quoted_values</tag>
+ <p>Regex pattern values cannot be parsed in parts of squid.conf when this
+ directive is configured to <em>ON</em>. Instead of quoted strings Squid
+ now accepts regex \-escaped characters (including escaped spaces) in all
+ regex patterns.
+
<tag>external_acl_type</tag>
<p>New format code <em>%ssl::>sni</em> to send SSL client SNI.
<p>New format code <em>%ssl::<cert_subject</em> to send SSL server certificate DN.
std::queue<std::string> ConfigParser::Undo_;
bool ConfigParser::AllowMacros_ = false;
bool ConfigParser::ParseQuotedOrToEol_ = false;
+bool ConfigParser::RecognizeQuotedPair_ = false;
bool ConfigParser::PreviewMode_ = false;
static const char *SQUID_ERROR_TOKEN = "[invalid token]";
sep = "\n";
else if (!ConfigParser::RecognizeQuotedValues || *nextToken == '(')
sep = w_space;
+ else if (ConfigParser::RecognizeQuotedPair_)
+ sep = w_space "\\";
else
sep = w_space "(";
nextToken += strcspn(nextToken, sep);
+ // NP: do not permit \0 terminator to be escaped.
+ while (ConfigParser::RecognizeQuotedPair_ && *nextToken && *(nextToken-1) == '\\') {
+ ++nextToken; // skip the quoted-pair (\-escaped) character
+ nextToken += strcspn(nextToken, sep);
+ }
+
if (ConfigParser::RecognizeQuotedValues && *nextToken == '(') {
if (strncmp(tokenStart, "parameters", nextToken - tokenStart) == 0)
type = ConfigParser::FunctionParameters;
debugs(3, DBG_CRITICAL, "FATAL: Can not read regex expression while configuration_includes_quoted_values is enabled");
self_destruct();
}
+ ConfigParser::RecognizeQuotedPair_ = true;
char * token = strtokFile();
+ ConfigParser::RecognizeQuotedPair_ = false;
return token;
}
debugs(3, DBG_CRITICAL, "FATAL: Can not read regex expression while configuration_includes_quoted_values is enabled");
self_destruct();
}
-
+ ConfigParser::RecognizeQuotedPair_ = true;
char * token = NextToken();
+ ConfigParser::RecognizeQuotedPair_ = false;
return token;
}
static std::queue<std::string> Undo_; ///< The list with TokenPutBack() queued elements
static bool AllowMacros_;
static bool ParseQuotedOrToEol_; ///< The next tokens will be handled as quoted or to_eol token
+ static bool RecognizeQuotedPair_; ///< The next tokens may contain quoted-pair (\-escaped) characters
static bool PreviewMode_; ///< The next token will not poped from cfg files, will just previewd.
};