diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-04-01 13:45:21 +0100 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-04-01 13:45:21 +0100 |
commit | bb4836f53d98d987a1702f970d4b853eaa529907 (patch) | |
tree | c0d16c64f89f10cd383cbbefa1cf2a914d0dc22a /indra/llplugin/llplugincookiestore.h | |
parent | a503cb57465594bf693ed335d04715389725b3b0 (diff) | |
parent | 68870a1f59c11a173353698b994f4540b214d57f (diff) |
another hairy merge from viewer-trunk
Diffstat (limited to 'indra/llplugin/llplugincookiestore.h')
-rw-r--r-- | indra/llplugin/llplugincookiestore.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/indra/llplugin/llplugincookiestore.h b/indra/llplugin/llplugincookiestore.h index 5250f008b6..a93f0c14f0 100644 --- a/indra/llplugin/llplugincookiestore.h +++ b/indra/llplugin/llplugincookiestore.h @@ -66,18 +66,21 @@ public: void setCookies(const std::string &cookies, bool mark_changed = true); void readCookies(std::istream& s, bool mark_changed = true); + // sets one or more cookies (without reinitializing anything), supplying a hostname the cookies came from -- use when setting a cookie manually + void setCookiesFromHost(const std::string &cookies, const std::string &host, bool mark_changed = true); + // quote or unquote a string as per the definition of 'quoted-string' in rfc2616 static std::string quoteString(const std::string &s); static std::string unquoteString(const std::string &s); private: - void setOneCookie(const std::string &s, std::string::size_type cookie_start, std::string::size_type cookie_end, bool mark_changed); + void setOneCookie(const std::string &s, std::string::size_type cookie_start, std::string::size_type cookie_end, bool mark_changed, const std::string &host = LLStringUtil::null); class Cookie { public: - static Cookie *createFromString(const std::string &s, std::string::size_type cookie_start = 0, std::string::size_type cookie_end = std::string::npos); + static Cookie *createFromString(const std::string &s, std::string::size_type cookie_start = 0, std::string::size_type cookie_end = std::string::npos, const std::string &host = LLStringUtil::null); // Construct a string from the cookie that uniquely represents it, to be used as a key in a std::map. std::string getKey() const; @@ -95,7 +98,7 @@ private: private: Cookie(const std::string &s, std::string::size_type cookie_start = 0, std::string::size_type cookie_end = std::string::npos); - bool parse(); + bool parse(const std::string &host); std::string::size_type findFieldEnd(std::string::size_type start = 0, std::string::size_type end = std::string::npos); bool matchName(std::string::size_type start, std::string::size_type end, const char *name); |