Boost C++ Libraries

PrevUpHomeNext

Function etag_list_matches

boost::taar::etag_list_matches — Evaluate an If-Match / If-None-Match field value against current.

Synopsis

// In header: <boost/taar/core/entity_tag.hpp>


bool etag_list_matches(std::string_view field, std::string_view current, 
                       bool weak);

Description

Parameters:

field

The field value: * or a comma-separated list of entity tags.

current

The current representation's entity tag as sent in ETag (with quotes, optionally W/).

weak

Use weak comparison (If-None-Match) instead of strong (If-Match).

Returns:

True if the field is * or any listed tag matches. A malformed list (or a malformed current) never matches.


PrevUpHomeNext