/* */ #ifndef D_COOKIE_HELPER_H #define D_COOKIE_HELPER_H #include "common.h" #include #include #include "a2time.h" namespace aria2 { class Cookie; namespace cookie { bool parseDate(time_t& time, std::string::const_iterator first, std::string::const_iterator last); std::unique_ptr parse(const std::string& cookieStr, const std::string& requestHost, const std::string& defaultPath, time_t creationTime); bool goodPath(std::string::const_iterator first, std::string::const_iterator last); std::string canonicalizeHost(const std::string& host); bool domainMatch(const std::string& requestHost, const std::string& domain); bool pathMatch(const std::string& requestPath, const std::string& path); std::string reverseDomainLevel(const std::string& domain); } // namespace cookie } // namespace aria2 #endif // D_COOKIE_HELPER_H