Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.4k
Open
Description
Bug report
http.server.SimpleHTTPRequestHandler.send_head()
does not check if a file's mtime is valid forgmtime()
on windows.
AnOSError: [Errno 22] Invalid argument
exception will be raised which is normal according to the documentation.
Line 752 inef633e5
fs.st_mtime,datetime.timezone.utc) |
Line 766 inef633e5
self.date_time_string(fs.st_mtime)) |
I encounter this error when using windows built-in unzip functionality to unzip a windows WireGuard client exported zip file.
The zip file does not contain any timestamp information. And windows will not auto fill timestamp information when unzipping.
And win32 apiGetFileInformationByHandle
will report back a timestamp of-11635213907.559603
Your environment
- CPython versions tested on:
3.10.9
,3.11.1
,3.12.0a4+
- Operating system and architecture: windows 11 pro 22h2 OS build 22621.1105 amd64