Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
1a63f9e3
authored
Sep 08, 2020
by
Phil Cluff
Committed by
Phil Cluff
Sep 28, 2020
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Update HTTP status codes expected in failover scenarios.
parent
04f67e4a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultLoadErrorHandlingPolicy.java
library/core/src/test/java/com/google/android/exoplayer2/upstream/DefaultLoadErrorHandlingPolicyTest.java
library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultLoadErrorHandlingPolicy.java
View file @
1a63f9e3
...
@@ -72,9 +72,12 @@ public class DefaultLoadErrorHandlingPolicy implements LoadErrorHandlingPolicy {
...
@@ -72,9 +72,12 @@ public class DefaultLoadErrorHandlingPolicy implements LoadErrorHandlingPolicy {
IOException
exception
=
loadErrorInfo
.
exception
;
IOException
exception
=
loadErrorInfo
.
exception
;
if
(
exception
instanceof
InvalidResponseCodeException
)
{
if
(
exception
instanceof
InvalidResponseCodeException
)
{
int
responseCode
=
((
InvalidResponseCodeException
)
exception
).
responseCode
;
int
responseCode
=
((
InvalidResponseCodeException
)
exception
).
responseCode
;
return
responseCode
==
404
// HTTP 404 Not Found.
return
responseCode
==
403
// HTTP 403 Forbidden.
||
responseCode
==
404
// HTTP 404 Not Found.
||
responseCode
==
410
// HTTP 410 Gone.
||
responseCode
==
410
// HTTP 410 Gone.
||
responseCode
==
416
// HTTP 416 Range Not Satisfiable.
||
responseCode
==
416
// HTTP 416 Range Not Satisfiable.
||
responseCode
==
500
// HTTP 500 Internal Server Error.
||
responseCode
==
503
// HTTP 503 Service Unavailable.
?
DEFAULT_TRACK_BLACKLIST_MS
?
DEFAULT_TRACK_BLACKLIST_MS
:
C
.
TIME_UNSET
;
:
C
.
TIME_UNSET
;
}
}
...
...
library/core/src/test/java/com/google/android/exoplayer2/upstream/DefaultLoadErrorHandlingPolicyTest.java
View file @
1a63f9e3
...
@@ -77,8 +77,8 @@ public final class DefaultLoadErrorHandlingPolicyTest {
...
@@ -77,8 +77,8 @@ public final class DefaultLoadErrorHandlingPolicyTest {
public
void
getExclusionDurationMsFor_dontExcludeUnexpectedHttpCodes
()
{
public
void
getExclusionDurationMsFor_dontExcludeUnexpectedHttpCodes
()
{
InvalidResponseCodeException
exception
=
InvalidResponseCodeException
exception
=
new
InvalidResponseCodeException
(
new
InvalidResponseCodeException
(
500
,
418
,
"I
nternal Server Error
"
,
"I
'm a teapot
"
,
Collections
.
emptyMap
(),
Collections
.
emptyMap
(),
new
DataSpec
(
Uri
.
EMPTY
),
new
DataSpec
(
Uri
.
EMPTY
),
/* responseBody= */
Util
.
EMPTY_BYTE_ARRAY
);
/* responseBody= */
Util
.
EMPTY_BYTE_ARRAY
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment