]> git.ipfire.org Git - thirdparty/squid.git/blob - src/StoreMetaVary.cc
SourceFormat Enforcement
[thirdparty/squid.git] / src / StoreMetaVary.cc
1 /*
2 * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
3 *
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.
7 */
8
9 /* DEBUG: section 20 Storage Manager Swapfile Metadata */
10
11 #include "squid.h"
12 #include "MemObject.h"
13 #include "Store.h"
14 #include "StoreMetaVary.h"
15
16 bool
17 StoreMetaVary::checkConsistency(StoreEntry *e) const
18 {
19 assert (getType() == STORE_META_VARY_HEADERS);
20
21 if (!e->mem_obj->vary_headers) {
22 /* XXX separate this mutator from the query */
23 /* Assume the object is OK.. remember the vary request headers */
24 e->mem_obj->vary_headers = xstrdup((char *)value);
25 return true;
26 }
27
28 if (strcmp(e->mem_obj->vary_headers, (char *)value) != 0)
29 return false;
30
31 return true;
32 }
33