Skip to content

Treat HTTP 202 as a failure and retry #645

Closed
@priyajeet

Description

@priyajeet
if (target.status >= 200 && target.status <= 299) {
        // All 2xx HTTP codes are success cases.
        ...
}

https://github.com/google/shaka-player/blob/18da8e04dc629ef059ec157587c21d21ce122103/lib/net/http_plugin.js#L47

Currently the player assumes that everything 2xx is a success. However 202 is generally used when the server hasn't finished processing and wants the client to try again later. From the documentation:

The request has been accepted for processing, but the processing has not been completed.

Should that if condition above be changed to filter 202? Or some new configuration parameter added such that clients can choose what constitutes a success.

Metadata

Metadata

Assignees

Labels

flag: good first issueThis might be a relatively easy issue; good for new contributorsstatus: archivedArchived and locked; will not be updatedtype: enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions