A method request may contain a constraint on the version of the resource to which it applies. There are 2 kinds of constraints: the resource's version must be identical to the constraint's (the resource is unmodified) or the resource must have a different version than the constraint's (the resource has been modified).
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.26
Public Types | |
typedef restcgi::version | version_type |
version type | |
Public Member Functions | |
version_constraint () | |
Construct. | |
version_constraint (const version_type &v, bool mod) | |
Construct. | |
bool | is_null () const |
Test if null. | |
const version_type & | version () const |
Get version. | |
bool | modified () const |
void | assert_satisfied (const version_type &v, const method_e &e) const |
void restcgi::version_constraint::assert_satisfied | ( | const version_type & | v, | |
const method_e & | e | |||
) | const |
Assert that the given version satisfies the constraint. This will check the version tags (if any) first then the expiration dates (if any). See class description.
precondition_failed | unmodified constraint not met or modified tag constraint not met | |
not_modified | modified date-time constraint not met |
bool restcgi::version_constraint::modified | ( | ) | const [inline] |
Get whether constrained to be modified.