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

Gzipped URLS with parameters don't match the .endswith() #120

Closed
mcrowson opened this issue Apr 25, 2017 · 0 comments
Closed

Gzipped URLS with parameters don't match the .endswith() #120

mcrowson opened this issue Apr 25, 2017 · 0 comments

Comments

@mcrowson
Copy link

I have a pre-signed S3 URL for a gzipped xml file.

https://bucket.s3.amazonaws.com/file.xml.gz?AWSAccessKeyId=asdf&Expires=2493144554&Signature=qasdf

The if fname.endswith('.gz') won't evaluate to True because of the URL parameters.

https://github.com/RaRe-Technologies/smart_open/blob/master/smart_open/smart_open_lib.py#L759

I suggest removing all query parameters when finding the file name.

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

No branches or pull requests

1 participant