typedef std::deque<NamedGuard> NamedGuards;
/// pseudonym to specify rules for "all other protocols"
- static const SBuf ProtoOther;
+ inline static const SBuf &ProtoOther();
/// rules governing upgrades to explicitly named protocols
NamedGuards namedGuards;
for (const auto &namedGuard: namedGuards)
visitor(namedGuard.protocol, namedGuard.guard);
if (other)
- visitor(ProtoOther, other);
+ visitor(ProtoOther(), other);
}
template <typename Visitor>
seenApplicable = true; // may already be true
}
if (!seenApplicable && other) // OTHER is applicable if named rules were not
- (void)visitor(ProtoOther, other);
+ (void)visitor(ProtoOther(), other);
+}
+
+inline const SBuf &
+HttpUpgradeProtocolAccess::ProtoOther()
+{
+ static const auto proto = new SBuf("OTHER");
+ return *proto;
}
#endif /* SQUID_SRC_HTTPUPGRADEPROTOCOLACCESS_H */