Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
50f85314
Commit
50f85314
authored
Aug 04, 2015
by
Robert Collins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #23888: Handle fractional time in cookie expiry. Patch by ssh.
parent
33ca93cf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
1 deletion
+12
-1
Lib/http/cookiejar.py
Lib/http/cookiejar.py
+1
-1
Lib/test/test_http_cookiejar.py
Lib/test/test_http_cookiejar.py
+9
-0
Misc/NEWS
Misc/NEWS
+2
-0
No files found.
Lib/http/cookiejar.py
View file @
50f85314
...
...
@@ -758,7 +758,7 @@ class Cookie:
):
if version is not None: version = int(version)
if expires is not None: expires = int(
expires
)
if expires is not None: expires = int(
float(expires)
)
if port is None and port_specified is True:
raise ValueError("if port is None, port_specified must be false")
...
...
Lib/test/test_http_cookiejar.py
View file @
50f85314
...
...
@@ -566,6 +566,15 @@ class CookieTests(unittest.TestCase):
self
.
assertEqual
(
len
(
c
),
1
)
self
.
assertIn
(
'spam="bar"'
,
h
)
# test if fractional expiry is accepted
cookie
=
Cookie
(
0
,
"name"
,
"value"
,
None
,
False
,
"www.python.org"
,
True
,
False
,
"/"
,
False
,
False
,
"1444312383.018307"
,
False
,
None
,
None
,
{})
self
.
assertEqual
(
cookie
.
expires
,
1444312383
)
# XXX RFC 2965 expiry rules (some apply to V0 too)
def
test_default_path
(
self
):
...
...
Misc/NEWS
View file @
50f85314
...
...
@@ -66,6 +66,8 @@ Core and Builtins
Library
-------
-
Issue
#
23888
:
Handle
fractional
time
in
cookie
expiry
.
Patch
by
ssh
.
-
Issue
#
23652
:
Make
it
possible
to
compile
the
select
module
against
the
libc
headers
from
the
Linux
Standard
Base
,
which
do
not
include
some
EPOLL
macros
.
Patch
by
Matt
Frank
.
...
...
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