Skip to content
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

Proxy: Handle non-200 HTTP codes on DASH manifests #4429

Merged
merged 1 commit into from
Apr 26, 2024

Conversation

absidue
Copy link
Contributor

@absidue absidue commented Feb 12, 2024

Currently Invidious assumes that fetching the DASH manifest from YouTube will always be successful and doesn't check the status code. That means that if it gets YouTube's ratelimiting page, it returns a response with a HTTP 200 status code, application/dash+xml Content-Type header and the response body being the HTML for YouTube ratelimiting page.

Real world example: https://invidious.nerdvpn.de/api/manifest/dash/id/jfKfPfyJRdk

Copied from the checks that are done for the HLS manifests:

if response.status_code != 200
haltf env, status_code: response.status_code
end

if response.status_code != 200
haltf env, status_code: response.status_code
end

@absidue absidue requested a review from a team as a code owner February 12, 2024 17:59
@absidue absidue requested review from syeopite and removed request for a team February 12, 2024 18:00
Copy link
Member

@SamantazFox SamantazFox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good to me!

@SamantazFox SamantazFox added the need-testing This feature needs to be deployed and tested to see if it's working, and doesn't break something label Feb 15, 2024
@SamantazFox
Copy link
Member

Of course it's not blocked on the test instance 🙄
https://test.invidious.io/api/manifest/dash/id/jfKfPfyJRdk

@SamantazFox SamantazFox added in-testing This feature has been deployed and is being tested and removed need-testing This feature needs to be deployed and tested to see if it's working, and doesn't break something labels Feb 16, 2024
@SamantazFox
Copy link
Member

I had no luck at trying to get youtube to block the test instance, but I'll mark this as ready anyway, I don't see why it wouldn't work.

@SamantazFox SamantazFox added ready and removed in-testing This feature has been deployed and is being tested labels Apr 20, 2024
@SamantazFox SamantazFox changed the title Handle non-200 status codes for YouTube DASH manifests Proxy: Handle non-200 HTTP codes on DASH manifests Apr 26, 2024
@SamantazFox SamantazFox merged commit bcb679e into iv-org:master Apr 26, 2024
7 checks passed
@absidue absidue deleted the fix-dash-status-code branch April 27, 2024 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants