[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_start-
From: |
Bastiaan Jacques |
Subject: |
[Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_start-190-gc97c13d |
Date: |
Tue, 08 Mar 2011 22:36:59 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".
The branch, master has been updated
via c97c13d2a70361ea97eae61cdff66e2893171793 (commit)
from 0f8e157f714cdccc6116cfbdb69d4305a90579db (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=c97c13d2a70361ea97eae61cdff66e2893171793
commit c97c13d2a70361ea97eae61cdff66e2893171793
Author: Bastiaan Jacques <address@hidden>
Date: Tue Mar 8 23:34:45 2011 +0100
Write cookie files in the format curl expects. Fixes bug #32719.
diff --git a/plugin/npapi/plugin.cpp b/plugin/npapi/plugin.cpp
index 788481d..5917be3 100644
--- a/plugin/npapi/plugin.cpp
+++ b/plugin/npapi/plugin.cpp
@@ -1092,10 +1092,27 @@ nsPluginInstance::setupCookies(const std::string&
pageurl)
gnash::log_debug("The Cookie for %s is %s", url, ncookie);
std::ofstream cookiefile;
std::stringstream ss;
- ss << "/tmp/gnash-cookies." << getpid();
-
+ ss << "/tmp/gnash-cookies." << getpid();
+
cookiefile.open(ss.str().c_str(), std::ios::out | std::ios::trunc);
- cookiefile << "Set-Cookie: " << ncookie << std::endl;
+
+ // Firefox provides cookies in the following format:
+ //
+ // cookie1=value1;cookie2=value2;cookie3=value3
+ //
+ // Whereas libcurl expects cookies in the following format:
+ //
+ // Set-Cookie: cookie1=value1;
+ // Set-Cookie: cookie2=value2;
+
+ typedef boost::char_separator<char> char_sep;
+ typedef boost::tokenizer<char_sep> tokenizer;
+ tokenizer tok(ncookie, char_sep(";"));
+
+ for (tokenizer::iterator it=tok.begin(); it != tok.end(); ++it) {
+ cookiefile << "Set-Cookie: " << *it << std::endl;
+ }
+
cookiefile.close();
if (setenv("GNASH_COOKIES_IN", ss.str().c_str(), 1) < 0) {
-----------------------------------------------------------------------
Summary of changes:
plugin/npapi/plugin.cpp | 23 ++++++++++++++++++++---
1 files changed, 20 insertions(+), 3 deletions(-)
hooks/post-receive
--
Gnash
- [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_start-190-gc97c13d,
Bastiaan Jacques <=