Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

OSError: [Errno 22] Invalid argument when serving files with last modified time before 1969-12-31 12:00 UTC on windows #101035

Open
Labels
stdlibPython modules in the Lib dirtype-bugAn unexpected behavior, bug, or error
@EvanLai88

Description

@EvanLai88

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.

fs.st_mtime,datetime.timezone.utc)

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

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibPython modules in the Lib dirtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp