| 1416 | } |
| 1417 | |
| 1418 | static bool |
| 1419 | checkForCacheHeader(const char *name, int name_len, const char *value, int value_len, bool &cacheable) |
| 1420 | { |
| 1421 | cacheable = true; |
| 1422 | if (Utils::areEqual(name, name_len, TS_MIME_FIELD_EXPIRES, TS_MIME_LEN_EXPIRES)) { |
| 1423 | if ((value_len == 1) && (*value == '0')) { |
| 1424 | cacheable = false; |
| 1425 | } else if (Utils::areEqual(value, value_len, "-1", 2)) { |
| 1426 | cacheable = false; |
| 1427 | } |
| 1428 | return true; |
| 1429 | } |
| 1430 | if (Utils::areEqual(name, name_len, TS_MIME_FIELD_CACHE_CONTROL, TS_MIME_LEN_CACHE_CONTROL)) { |
| 1431 | if (Utils::areEqual(value, value_len, TS_HTTP_VALUE_PRIVATE, TS_HTTP_LEN_PRIVATE)) { |
| 1432 | cacheable = false; |
| 1433 | } |
| 1434 | return true; |
| 1435 | } |
| 1436 | return false; |
| 1437 | } |
| 1438 | |
| 1439 | static bool |
| 1440 | addSendResponseHeaderHook(TSHttpTxn txnp, const ContData *src_cont_data) |
no test coverage detected