summaryrefslogtreecommitdiffabout
path: root/include/kingate/cookies.h
Side-by-side diff
Diffstat (limited to 'include/kingate/cookies.h') (more/less context) (ignore whitespace changes)
-rw-r--r--include/kingate/cookies.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/kingate/cookies.h b/include/kingate/cookies.h
index 83ef0c6..a1e813c 100644
--- a/include/kingate/cookies.h
+++ b/include/kingate/cookies.h
@@ -162,139 +162,139 @@ namespace kingate {
* @see has_expires()
* @see unset_expires()
*/
const string& get_expires() const;
/**
* @return true if cookie has comment.
* @see set_comment()
* @see get_comment()
* @see unset_comment()
*/
bool has_comment() const;
/**
* @return true if cookie has domain.
* @see set_domain()
* @see get_domain()
* @see unset_domain()
*/
bool has_domain() const;
/**
* @return true if cookie has max-age.
* @see set_max_age()
* @see get_max_age()
* @see unset_max_age()
*/
bool has_max_age() const;
/**
* @return true if cookie has path.
* @see set_path()
* @see get_path()
* @see unset_path()
*/
bool has_path() const;
/**
* @return true if cookie has expiration time.
* @see set_expires()
* @see get_expires()
* @see unset_expires()
*/
bool has_expires() const;
/**
* rid cookie of comment.
* @see set_comment()
* @see get_comment()
* @see has_comment()
*/
void unset_comment();
/**
* rid cookie of domain.
* @see set_domain()
* @see get_domain()
* @see has_domain()
*/
void unset_domain();
/**
* rid cookie of max-age.
* @see set_max_age()
* @see get_max_age()
* @see has_max_age()
*/
void unset_max_age();
/**
* rid cookie of path.
* @see set_path()
* @see get_path()
* @see has_path()
*/
void unset_path();
/**
* rid cookie of expiration time.
* @see set_expires()
* @see get_expires()
* @see has_expires()
*/
void unset_expires();
/**
* render the 'Set-Cookie' HTTP header according to RFC2109.
* Absolutely useless, only works with lynx.
* @return the rendered header content.
*/
string set_cookie_header_rfc2109() const;
/**
* render the 'Set-Cookie' header according to the early vague
* netscape specs and common practice.
* @return the rendered header content.
*/
string set_cookie_header() const;
};
/**
* Cookies container class.
*/
- class cookies_t : public map<string,cookie> {
+ class cookies_t : public multimap<string,cookie> {
public:
cookies_t() { }
/**
* @param s 'Cookie:' HTTP header contents to parse.
*/
cookies_t(const string& s) { parse_cookies(s); }
/**
* @param c cookie to set.
*/
- void set_cookie(const cookie& c) { (*this)[c.get_name()]=c; }
+ void set_cookie(const cookie& c);
/**
* @param n cookie name to remove.
*/
void unset_cookie(const key_type& n) { erase(n); }
/**
* @param n cookie name.
* @return true if exists.
*/
bool has_cookie(const key_type& n) const;
/**
* Return the named cookie if one exists.
* @param n cookie name.
* @return const reference to cookie object.
*/
const cookie& get_cookie(const key_type& n) const;
/**
* Return the named cookie if one exists.
* @param n cookie name.
* @return reference to cookie object.
*/
cookie& get_cookie(const key_type& n);
/**
* @param s HTTP 'Cookie' header content.
*/
void parse_cookies(const string& s);
};
}
#endif /* __KINGATE_COOKIES_H */