-
-
Notifications
You must be signed in to change notification settings - Fork 33.4k
Open
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
http.server.SimpleHTTPRequestHandler.send_head() does not check if a file's mtime is valid for gmtime() on windows.
An OSError: [Errno 22] Invalid argument exception will be raised which is normal according to the documentation.
Line 752 in ef633e5
| fs.st_mtime, datetime.timezone.utc) |
Line 766 in ef633e5
| 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 api GetFileInformationByHandle 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
Linked PRs
Metadata
Metadata
Assignees
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error