summaryrefslogtreecommitdiff
path: root/src/Cookie.h
diff options
context:
space:
mode:
authorNils Maier <maierman@web.de>2013-11-26 02:59:51 +0100
committerNils Maier <maierman@web.de>2013-12-09 15:41:43 +0100
commit2db0c81fc8067d73230fcbffc90bd7ad1f9c07b0 (patch)
treea6c37eaa4de5ef4c8b4e982cb7d87c1f6ac5bf3b /src/Cookie.h
parent1323048ab1a254510e32d47f5549f4e30d273e5a (diff)
Stuff memory holes
Padding changes on x86_64: - RequestGroup: 29 -> 5 bytes - DownloadContext: 25 -> 1 bytes - Cookie: 20 -> 4 bytes - Command: 8 -> 0 bytes (affects many derived as well) - HttpRequest: 20 -> 4 bytes - DownloadCommand: 18 -> 2 bytes - TimeBasedCommand: 14 -> 6 bytes - AbstractCommand: 13 -> 5 bytes - HttpSkipResponseCommand: 12 -> 4 bytes - FileEntry: 10 -> 2 bytes - DownloadResult: 15 -> 7 bytes - UriStruct: 12 -> 4 bytes - Piece: 11 -> 3 bytes - BitfieldMan -> 11 -> 3 bytes
Diffstat (limited to 'src/Cookie.h')
-rw-r--r--src/Cookie.h31
1 files changed, 11 insertions, 20 deletions
diff --git a/src/Cookie.h b/src/Cookie.h
index d97ddaeb..aa711724 100644
--- a/src/Cookie.h
+++ b/src/Cookie.h
@@ -45,40 +45,31 @@ namespace aria2 {
class Cookie {
private:
+ time_t expiryTime_;
+ time_t creationTime_;
+ time_t lastAccessTime_;
std::string name_;
std::string value_;
- time_t expiryTime_;
+ std::string domain_;
+ std::string path_;
// If persistent_ is false, this is a session scope cookie and it is
// never expired during session. So isExpired() always returns
// false.
bool persistent_;
- std::string domain_;
bool hostOnly_;
- std::string path_;
bool secure_;
bool httpOnly_;
- time_t creationTime_;
- time_t lastAccessTime_;
+
public:
Cookie();
-
- Cookie
- (std::string name,
- std::string value,
- time_t expiryTime,
- bool persistent,
- std::string domain,
- bool hostOnly,
- std::string path,
- bool secure,
- bool httpOnly,
- time_t creationTime);
+ Cookie(std::string name, std::string value, time_t expiryTime,
+ bool persistent, std::string domain, bool hostOnly, std::string path,
+ bool secure, bool httpOnly, time_t creationTime);
std::string toString() const;
- bool match
- (const std::string& requestHost, const std::string& requestPath,
- time_t date, bool secure) const;
+ bool match(const std::string& requestHost, const std::string& requestPath,
+ time_t date, bool secure) const;
bool operator==(const Cookie& cookie) const;