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

[SYNPY-1525] Verify expiration param in url #1139

Merged
merged 5 commits into from
Oct 1, 2024

Conversation

BryanFauble
Copy link
Contributor

@BryanFauble BryanFauble commented Sep 27, 2024

Problem:

  1. Fixes KeyError: 'X-Amz-Date' when trying to download HTAN data #1138

Solution:

  1. Verify presence of query param in URL

Testing:

  1. Manually tested with a google backed item that it could be downloaded

@BryanFauble BryanFauble changed the title Verify param in url [SYNPY-1525] Verify expiration param in url Sep 27, 2024
@pep8speaks
Copy link

pep8speaks commented Sep 27, 2024

Hello @BryanFauble! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 933:89: E501 line too long (93 > 88 characters)
Line 936:89: E501 line too long (90 > 88 characters)

Comment last updated at 2024-09-27 22:19:36 UTC

@BryanFauble BryanFauble marked this pull request as ready for review September 27, 2024 22:41
@BryanFauble BryanFauble requested a review from a team as a code owner September 27, 2024 22:41
url_has_expiration = "Expires" in urllib_urlparse.urlparse(url).query
url_query = urllib_urlparse.urlparse(url).query
url_has_expiration = (
"Expires" in url_query and "X-Amz-Expires" in url_query
Copy link
Member

@thomasyu888 thomasyu888 Sep 27, 2024

Choose a reason for hiding this comment

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

Nit: is there a reason it isn't just X-Amz-Expires since it's an "and" statement?

Edit: I just saw the tests, nevermind

Copy link
Member

@thomasyu888 thomasyu888 left a comment

Choose a reason for hiding this comment

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

🔥 LGTM!

@BryanFauble BryanFauble merged commit 56ebcd0 into develop Oct 1, 2024
23 checks passed
@BryanFauble BryanFauble deleted the synpy-1525-check-for-expires-in-url branch October 1, 2024 18:35
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.

KeyError: 'X-Amz-Date' when trying to download HTAN data
4 participants