aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
authorGravatar Brendan Taylor <whateley@gmail.com>2011-12-13 18:06:37 -0700
committerGravatar Brendan Taylor <whateley@gmail.com>2012-01-10 20:24:36 -0700
commit3d31b1baf6f17c955db018a81aa77efee36f263a (patch)
treeb339c00af2fd4440856244f47f828f807df54de3 /examples
parenteff8d68812c996b2ce8cc0747935f702ba64ccf9 (diff)
parenta964be6bd96583f8735fd297856f1c9845850f6a (diff)
Merge remote-tracking branch 'dylex/master'
Conflicts: src/uzbl-core.c
Diffstat (limited to 'examples')
-rw-r--r--examples/data/plugins/cookies.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/examples/data/plugins/cookies.py b/examples/data/plugins/cookies.py
index e29ee36..a09cf69 100644
--- a/examples/data/plugins/cookies.py
+++ b/examples/data/plugins/cookies.py
@@ -39,7 +39,9 @@ class TextStore(object):
'TRUE' : 'https',
'FALSE' : 'http'
}
+ extra = ''
if cookie[0].startswith("#HttpOnly_"):
+ extra = 'Only'
domain = cookie[0][len("#HttpOnly_"):]
elif cookie[0].startswith('#'):
return None
@@ -50,7 +52,7 @@ class TextStore(object):
cookie[2],
cookie[5],
cookie[6],
- scheme[cookie[3]],
+ scheme[cookie[3]] + extra,
cookie[4])
except (KeyError,IndexError):
# Let malformed rows pass through like comments
@@ -60,9 +62,17 @@ class TextStore(object):
"""Convert cookie event to cookie.txt row"""
secure = {
'https' : 'TRUE',
- 'http' : 'FALSE'
+ 'http' : 'FALSE',
+ 'httpsOnly' : 'TRUE',
+ 'httpOnly' : 'FALSE'
}
- return (cookie[0],
+ http_only = {
+ 'https' : '',
+ 'http' : '',
+ 'httpsOnly' : '#HttpOnly_',
+ 'httpOnly' : '#HttpOnly_'
+ }
+ return (http_only[cookie[4]] + cookie[0],
'TRUE' if cookie[0].startswith('.') else 'FALSE',
cookie[1],
secure[cookie[4]],