MXS-1220: Add Last-Modified and ETag headers

The resource system now tracks both the time when a resource was last
modified and the revision number of the resource. This allows working
Last-Modified and ETag headers to be generated by the REST API.

The If-Modified-Since and If-None-Match request headers are not yet
processed and using them will always return the resource instead of a 304
Not Modified response.
This commit is contained in:
Markus Mäkelä
2017-05-07 23:32:18 +03:00
parent 717f883839
commit 3deb497394
4 changed files with 170 additions and 7 deletions

View File

@ -62,8 +62,8 @@ private:
bool matching_variable_path(const std::string& path, const std::string& target) const;
ResourceCallback m_cb; /**< Resource handler callback */
std::deque<std::string> m_path; /**< Path components */
ResourceCallback m_cb; /**< Resource handler callback */
std::deque<std::string> m_path; /**< Path components */
};
/**