int32_t ma;
if (!p || !httpHeaderParseInt(p, &ma)) {
debugs(65, 2, "cc: invalid max-age specs near '" << item << "'");
- cc->setMaxAge(-1);
+ cc->setMaxAge(MAX_AGE_UNSET);
} else {
cc->setMaxAge(ma);
}
max_age = max_age_;
} else {
EBIT_CLR(mask, CC_MAX_AGE);
- max_age=-1;
+ max_age=MAX_AGE_UNSET;
}
}
{
public:
+ static const int32_t MAX_AGE_UNSET=-1; //max-age is unset
+
explicit HttpHdrCc() :
- mask(0), max_age(-1), s_maxage(-1),
+ mask(0), max_age(MAX_AGE_UNSET), s_maxage(-1),
max_stale(-1), stale_if_error(0),
min_fresh(-1) {}
void clear();
bool parse(const String & s);
+
void setMaxAge(int32_t max_age);
int32_t getMaxAge() const;
+
MEMPROXY_CLASS(HttpHdrCc);
int32_t mask;