[all] Replace HTTPContextBase/HTTPRequestBase with FileSource

This commit is contained in:
John Firebaugh
2016-02-15 17:35:13 -08:00
parent 6d88a23a60
commit 3af3e72bb3
16 changed files with 377 additions and 600 deletions

View File

@@ -25,5 +25,13 @@ CacheControl CacheControl::parse(const std::string& value) {
return result;
}
optional<SystemTimePoint> CacheControl::toTimePoint() const {
// Round trip through time_t to truncate fractional seconds.
return maxAge
? SystemClock::from_time_t(SystemClock::to_time_t(
SystemClock::now() + std::chrono::seconds(*maxAge)))
: optional<SystemTimePoint>();
}
} // namespace http
} // namespace mbgl