-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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: import_utils fetch_archive_from_http
- improve url parsing for fetching archive from http
#5199
fix: import_utils fetch_archive_from_http
- improve url parsing for fetching archive from http
#5199
Conversation
…he file extension such as query parameters
628d961
to
8e56a07
Compare
Hello @malte-aws and thanks for the PR, that is useful and appreciated! 👍 Some suggestions:
Let us know if you need any help and thanks again! |
Hi @anakin87, thank you for the feedback. I addressed the improvements by
Kind regards |
Pull Request Test Coverage Report for Build 5448745686
💛 - Coveralls |
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.
This PR is in a very good state.
It would be great if you could add a test for a "normal" URL, such as http://www.mysite.com/resources/myfile.zip
Co-authored-by: Stefano Fiorucci <44616784+anakin87@users.noreply.github.com>
Co-authored-by: Stefano Fiorucci <44616784+anakin87@users.noreply.github.com>
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.
Looks good to me!
Thank you once again for your first PR on Haystack 🥳
Related Issues
Proposed Changes:
The extension of the archive was determined by splitting the URL at
"."
usingrpartition
and then using the string to the right of the"."
as the file extension.This pull request uses
urllib.parse.urlparse
to split the URL into its components. Then I usesplitext
to split the archive extension from the path in the URL.How did you test it?
Manual test with the To Reproduce instruction from #5198
Checklist
fix:
,feat:
,build:
,chore:
,ci:
,docs:
,style:
,refactor:
,perf:
,test:
.