Skip to content

Cache file validation in cache manager #6148

Description

@swissspidy

Originally reported in wp-cli/extension-command#123 with a proof of concept at wp-cli/extension-command#472

As per wp-cli/extension-command#472 (comment), I think it makes sense to include validation of potentially corrupt ZIP files directly in WpHttpCacheManager.

WpHttpCacheManager could automatically do some validation based on the detected content type. So if a downloaded ZIP is corrupt, we wouldn't add it to FileCache but throw an error instead.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions