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

Switch to requests to check headers before streaming content #307

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

raincoastchris
Copy link
Contributor

Fixes #299

@raincoastchris raincoastchris marked this pull request as draft May 3, 2023 18:26
@rom1504
Copy link
Owner

rom1504 commented May 3, 2023

Interesting!

If you can run some benchmarks it would be ideal.

There are some options here to use robots.txt and/or this header checking to improve both the efficiency and the compliance to host preferences.

For some use cases we also want to discard early the url if it ends up not being an image, so being able to stop the connection if the header is not appropriate may be interesting there too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Waiting for user input
Development

Successfully merging this pull request may close these issues.

Implement HEAD followed by GET to reduce traffic when headers are present
2 participants