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

Detect HTTPS links in content_type() #259

Merged
merged 1 commit into from
Nov 21, 2021

Conversation

guludo
Copy link
Contributor

@guludo guludo commented Jan 21, 2021

Hi there,

This allows downloading files provided via https links.

This PR fixes #258 .

Best regards,
Gustavo Sousa

This allows downloading files provided via https links.
@benureau
Copy link
Contributor

It's a simple but critical improvement. I would prefer having a test for this, but I am not sure that downloading a file of the internet with unit test is a good idea. I will look into it.

@omangin
Copy link
Member

omangin commented Jan 23, 2021

I would prefer having a test for this, but I am not sure that downloading a file of the internet with unit test is a good idea.

Let's add first a simple unit test for the content_type method that the PR changes. Then is should be feasible to just mock the urlopen imported in the module to get a functional test that does not rely on an internet connection.

@benureau
Copy link
Contributor

@guludo: I am merging this (sorry for the delay!). I will add a test for it, but I am decoupling that from merging this. See #271.

@benureau benureau merged commit 4ec4ba0 into pubs:main Nov 21, 2021
@guludo
Copy link
Contributor Author

guludo commented Nov 21, 2021

No worries! And thanks for applying. Sorry I couldn't help writing tests for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Download file if link is passed to pubs doc add
3 participants