2 * Copyright (C) 1996-2016 The Squid Software Foundation and contributors
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
9 /* DEBUG: section 65 HTTP Cache Control Header */
15 HttpHdrCc::isSet(HttpHdrCcType id) const
17 assert(id < HttpHdrCcType::CC_ENUM_END);
18 return EBIT_TEST(mask, static_cast<long>(id));
22 HttpHdrCc::setMask(HttpHdrCcType id, bool newval)
25 EBIT_SET(mask,static_cast<long>(id));
27 EBIT_CLR(mask, static_cast<long>(id));
30 /// set a data member to a new value, and set the corresponding mask-bit.
31 /// if setting is false, then the mask-bit is cleared.
33 HttpHdrCc::setValue(int32_t &value, int32_t new_value, HttpHdrCcType hdr, bool setting)
37 debugs(65,3,HERE << "rejecting negative-value Cache-Control directive " << hdr
38 << " value " << new_value );
42 new_value=-1; //rely on the convention that "unknown" is -1