ssh added the comment:

Wouldn't int(float(expires) * 1e6) set the date much further in the future? I'm 
not sure why you'd do that unless the plan is to change the internal time unit 
to microseconds (which seems like a much bigger change, and overkill for 
handling this special case). Cookie strings operate at the second granularity, 
so I'm not sure if the sub-second precision is required.

I took a quick look at curl's code and test cases, and they use a time_t 
structure which doesn't have subsecond precision. Fractional time is not a part 
of their test cases.

https://github.com/bagder/curl/blob/6f8046f7a4bd3d6edcc53c2eec936105ec424d54/tests/libtest/lib517.c

https://github.com/bagder/curl/blob/664b9baf67c2c22ebaf3606298ca9c4ce0b382d2/lib/parsedate.c#L331

Wget also appears to do something similar:

http://bzr.savannah.gnu.org/lh/wget/trunk/annotate/head:/src/cookies.c#L387

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23888>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to