Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Update shouldn't fail due to MIME check or 404 for the incumbent's worker scripts #1374

@mfalken

Description

@mfalken

The update check spiders the script resource map of the incumbent worker scripts, but then fails immediately if one script has a non-OK status or fails the MIME check. This means if the incumbent worker is using import-script.js which now 404s, and the updated worker doesn't use import-script.js, the update will fail.

Instead these checks shouldn't fail the whole update, since it's not known whether the new worker will use them.

For each url → storedResponse of newestWorker’s script resource map:
...
7. Extract a MIME type from the fetchedResponse’s header list. If this MIME type (ignoring parameters) is not a JavaScript MIME type, asynchronously complete these steps with a network error.
8. If fetchedResponse’s type is "error", or fetchedResponse’s status is not an ok status, asynchronously complete these steps with a network error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions