From: rousskov <> Date: Mon, 31 May 1999 11:03:35 +0000 (+0000) Subject: - the max-age cc option may be preceded with a comma like any other option X-Git-Tag: SQUID_3_0_PRE1~2162 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=91274dd05d9bd559859ad6f78c971844114f6f7f;p=thirdparty%2Fsquid.git - the max-age cc option may be preceded with a comma like any other option --- diff --git a/src/HttpHdrCc.cc b/src/HttpHdrCc.cc index c4e6f54a3f..db16a0aed6 100644 --- a/src/HttpHdrCc.cc +++ b/src/HttpHdrCc.cc @@ -1,6 +1,6 @@ /* - * $Id: HttpHdrCc.cc,v 1.16 1998/12/05 00:54:09 wessels Exp $ + * $Id: HttpHdrCc.cc,v 1.17 1999/05/31 05:03:35 rousskov Exp $ * * DEBUG: section 65 HTTP Cache Control Header * AUTHOR: Alex Rousskov @@ -165,11 +165,15 @@ httpHdrCcPackInto(const HttpHdrCc * cc, Packer * p) int pcount = 0; assert(cc && p); for (flag = 0; flag < CC_ENUM_END; flag++) { - if (flag == CC_MAX_AGE && cc->max_age >= 0) { - packerPrintf(p, "max-age=%d", (int) cc->max_age); - pcount++; - } else if (EBIT_TEST(cc->mask, flag) && flag != CC_OTHER) { + if (EBIT_TEST(cc->mask, flag) && flag != CC_OTHER) { + + /* print option name */ packerPrintf(p, (pcount ? ", %s" : "%s"), strBuf(CcFieldsInfo[flag].name)); + + /* handle options with values */ + if (flag == CC_MAX_AGE) + packerPrintf(p, "=%d", (int) cc->max_age); + pcount++; } }