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: Replace Loader.getResponseHeader() with Loader.getCacheAge(). #3711
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -160,15 +160,13 @@ class FetchLoader implements Loader<LoaderContext> { | |
}); | ||
} | ||
|
||
getResponseHeader(name: string): string | null { | ||
getCacheAge(): number | null { | ||
let result: number | null = null; | ||
if (this.response) { | ||
try { | ||
return this.response.headers.get(name); | ||
} catch (error) { | ||
/* Could not get header */ | ||
} | ||
const ageHeader = this.response.headers.get('age'); | ||
result = ageHeader ? parseFloat(ageHeader) : null; | ||
} | ||
return null; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. At some point in a future release, we may want to get a
|
||
return result; | ||
} | ||
|
||
private loadProgressively( | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In earlier builds under feature/v1.0.0 where we were demoing LHLS (the Bartos spec), we tried using Modified-Date and some other headers to sync playlist requests with the server.