Skip to content

Cache file validation in cache manager #6148

@swissspidy

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.

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