Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Jean-Francois Dockes
recoll-webui
Commits
ee915fda
Commit
ee915fda
authored
Mar 02, 2015
by
koniu
Browse files
Merge pull request #40 from medoc92/master
Changed the value of set_cookie() 'expires' from 3x10**9 3x10**8 (10 years)
parents
9ed8494e
3504092c
Changes
2
Hide whitespace changes
Inline
Side-by-side
bottle.py
View file @
ee915fda
...
...
@@ -1422,7 +1422,7 @@ class BaseResponse(object):
if
key
==
'expires'
:
if
isinstance
(
value
,
(
datedate
,
datetime
)):
value
=
value
.
timetuple
()
elif
isinstance
(
value
,
(
int
,
float
)):
elif
isinstance
(
value
,
(
int
,
long
,
float
)):
value
=
time
.
gmtime
(
value
)
value
=
time
.
strftime
(
"%a, %d %b %Y %H:%M:%S GMT"
,
value
)
self
.
_cookies
[
name
][
key
.
replace
(
'_'
,
'-'
)]
=
value
...
...
webui.py
View file @
ee915fda
...
...
@@ -342,10 +342,10 @@ def settings():
def
set
():
config
=
get_config
()
for
k
,
v
in
DEFAULTS
.
items
():
bottle
.
response
.
set_cookie
(
k
,
str
(
bottle
.
request
.
query
.
get
(
k
)),
max_age
=
3153600000
,
expires
=
315360000
0
)
bottle
.
response
.
set_cookie
(
k
,
str
(
bottle
.
request
.
query
.
get
(
k
)),
max_age
=
3153600000
,
expires
=
315360000
)
for
d
in
config
[
'dirs'
]:
cookie_name
=
'mount_%s'
%
urllib
.
quote
(
d
,
''
)
bottle
.
response
.
set_cookie
(
cookie_name
,
str
(
bottle
.
request
.
query
.
get
(
'mount_%s'
%
d
)),
max_age
=
3153600000
,
expires
=
315360000
0
)
bottle
.
response
.
set_cookie
(
cookie_name
,
str
(
bottle
.
request
.
query
.
get
(
'mount_%s'
%
d
)),
max_age
=
3153600000
,
expires
=
315360000
)
bottle
.
redirect
(
'./'
)
#}}}
#{{{ osd
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment