// Copyright 2012 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef NET_HTTP_HTTP_VARY_DATA_H_ #define NET_HTTP_HTTP_VARY_DATA_H_ #include "base/hash/md5.h" #include "net/base/net_export.h" namespace base { class Pickle; class PickleIterator; } namespace net { struct HttpRequestInfo; class HttpResponseHeaders; // Used to implement the HTTP/1.1 Vary header. This class contains a MD5 hash // over the request headers indicated by a Vary header. // // While RFC 2616 requires strict request header comparisons, it is much // cheaper to store a MD5 sum, which should be sufficient. Storing a hash also // avoids messy privacy issues as some of the request headers could hold // sensitive data (e.g., cookies). // // NOTE: This class does not hold onto the contents of the Vary header. // Instead, it relies on the consumer to store that and to supply it again to // the MatchesRequest function for comparing against future HTTP requests. // class NET_EXPORT_PRIVATE HttpVaryData { … }; } // namespace net #endif // NET_HTTP_HTTP_VARY_DATA_H_