-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Allow overriding special handling of 404s #4635
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In general, streaming.failureCallback is meant to give applications control over error handling at the level of streaming. However, there was a special case for HTTP 404s built into StreamingEngine in a way that applications could not override. This was in spite of the fact that the default failureCallback would already check for and retry on the error code BAD_HTTP_STATUS. This removes the special case in StreamingEngine and refactors failureCallback and retryStreaming to preserve the special delay imposed in the old 404 handler. With this, applications can override failureCallback to have complete control over 404 handling. Closes shaka-project#4548
joeyparrish
requested review from
littlespex,
avelad,
JulianDomingo and
theodab
October 31, 2022 20:21
Incremental code coverage: 100.00% |
Adding some new test cases to cover defaultStreamingFailureCallback_ in Player. |
Much better. |
avelad
added
type: bug
Something isn't working correctly
priority: P2
Smaller impact or easy workaround
labels
Nov 1, 2022
avelad
approved these changes
Nov 1, 2022
theodab
approved these changes
Nov 1, 2022
joeyparrish
added a commit
that referenced
this pull request
Nov 8, 2022
In general, streaming.failureCallback is meant to give applications control over error handling at the level of streaming. However, there was a special case for HTTP 404s built into StreamingEngine in a way that applications could not override. This was in spite of the fact that the default failureCallback would already check for and retry on the error code BAD_HTTP_STATUS. This removes the special case in StreamingEngine and refactors failureCallback and retryStreaming to preserve the special delay imposed in the old 404 handler. With this, applications can override failureCallback to have complete control over 404 handling. Closes #4548
joeyparrish
added a commit
that referenced
this pull request
Nov 8, 2022
In general, streaming.failureCallback is meant to give applications control over error handling at the level of streaming. However, there was a special case for HTTP 404s built into StreamingEngine in a way that applications could not override. This was in spite of the fact that the default failureCallback would already check for and retry on the error code BAD_HTTP_STATUS. This removes the special case in StreamingEngine and refactors failureCallback and retryStreaming to preserve the special delay imposed in the old 404 handler. With this, applications can override failureCallback to have complete control over 404 handling. Closes #4548
joeyparrish
added a commit
that referenced
this pull request
Nov 8, 2022
In general, streaming.failureCallback is meant to give applications control over error handling at the level of streaming. However, there was a special case for HTTP 404s built into StreamingEngine in a way that applications could not override. This was in spite of the fact that the default failureCallback would already check for and retry on the error code BAD_HTTP_STATUS. This removes the special case in StreamingEngine and refactors failureCallback and retryStreaming to preserve the special delay imposed in the old 404 handler. With this, applications can override failureCallback to have complete control over 404 handling. Closes #4548
joeyparrish
added a commit
that referenced
this pull request
Nov 8, 2022
In general, streaming.failureCallback is meant to give applications control over error handling at the level of streaming. However, there was a special case for HTTP 404s built into StreamingEngine in a way that applications could not override. This was in spite of the fact that the default failureCallback would already check for and retry on the error code BAD_HTTP_STATUS. This removes the special case in StreamingEngine and refactors failureCallback and retryStreaming to preserve the special delay imposed in the old 404 handler. With this, applications can override failureCallback to have complete control over 404 handling. Closes #4548
github-actions
bot
added
the
status: archived
Archived and locked; will not be updated
label
Jul 25, 2023
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
priority: P2
Smaller impact or easy workaround
status: archived
Archived and locked; will not be updated
type: bug
Something isn't working correctly
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In general, streaming.failureCallback is meant to give applications control over error handling at the level of streaming. However, there was a special case for HTTP 404s built into StreamingEngine in a way that applications could not override. This was in spite of the fact that the default failureCallback would already check for and retry on the error code BAD_HTTP_STATUS.
This removes the special case in StreamingEngine and refactors failureCallback and retryStreaming to preserve the special delay imposed in the old 404 handler. With this, applications can override failureCallback to have complete control over 404 handling.
Closes #4548