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

Use downcase to match retry-after header #44

Merged

Conversation

qgadrian
Copy link
Contributor

The header is now being returned in lower case by the Spotify API, let's
make it downcase anyway to ensure we will always match the correct
header.

The header is being returned in lower case by the Spotify API, let's
make it downcase anyway to ensure we will always match the correct
header.
@jsncmgs1
Copy link
Owner

jsncmgs1 commented Jun 2, 2020

@qgadrian how do you feel about checking both retry-header and Retry-Header? Looking at spotify/web-api#1267, it seems unresolved and it could go either way.

@qgadrian
Copy link
Contributor Author

qgadrian commented Jun 3, 2020

Hey @jsncmgs1, thanks for taking a look.

This change converts both retry-header and Retry-Header to downcase to cover both cases.

We could use pattern matching in the Enum.find/2 function as well to make it more explicit if you want, but downcasing should be good enough IMO.

@jsncmgs1
Copy link
Owner

jsncmgs1 commented Jun 3, 2020

Somehow I totally missed that 🤦

@jsncmgs1 jsncmgs1 merged commit a34c55c into jsncmgs1:master Jun 3, 2020
@qgadrian
Copy link
Contributor Author

qgadrian commented Jun 3, 2020

No worries, thanks for your work!

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.

2 participants