/*
- * Copyright (C) 1996-2022 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
*
* Squid software is distributed under GPLv2+ license and includes
* contributions from numerous individuals and organizations.
#include "ssl/ErrorDetailManager.h"
#endif
+#include <array>
+
/**
\defgroup ErrorPageInternal Error Page Internals
\ingroup ErrorPageAPI
const char *text() { return template_.c_str(); }
protected:
- virtual void setDefault() override {
+ void setDefault() override {
template_ = "Internal Error: Missing Template ";
template_.append(templateName.termedBuf());
}
case 'O':
if (!building_deny_info_url)
do_quote = 0;
- /* [[fallthrough]] */
+ [[fallthrough]];
case 'o':
p = request ? request->extacl_message.termedBuf() : external_acl_message;
if (!p && !building_deny_info_url)
*/
if (!Config.errorDirectory) {
/* We 'negotiated' this ONLY from the Accept-Language. */
- rep->header.delById(Http::HdrType::VARY);
- rep->header.putStr(Http::HdrType::VARY, "Accept-Language");
+ static const SBuf acceptLanguage("Accept-Language");
+ rep->header.updateOrAddStr(Http::HdrType::VARY, acceptLanguage);
}
/* add the Content-Language header according to RFC section 14.12 */