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

Add support for RFC1123 Date/Time in Retry-After header. #143

Closed
wants to merge 1 commit into from

Conversation

palczyn
Copy link

@palczyn palczyn commented Sep 20, 2021

The Retry-After response HTTP header indicates how long the user agent should wait before making a follow-up request. It can be declared with a time duration or timestamp but go-retryablehttp supports only time duration.

Directives
<http-date>
A date after which to retry. See the Date header for more details on the HTTP date format.

<delay-seconds>
A non-negative decimal integer indicating the seconds to delay after the response is received.

@hashicorp-cla
Copy link

hashicorp-cla commented Sep 20, 2021

CLA assistant check
All committers have signed the CLA.

@palczyn palczyn marked this pull request as draft September 20, 2021 10:33
@palczyn
Copy link
Author

palczyn commented Sep 20, 2021

Here is another pull request that accomplishes the same. PR #138

@palczyn palczyn marked this pull request as ready for review September 20, 2021 10:42
@palczyn
Copy link
Author

palczyn commented Sep 20, 2021

Also this PR is heavily inspired by PR #130 as it was the one I saw first and I decided to resolve conflicts that arose in the meantime.

@justenwalker
Copy link
Contributor

I opened #144 for discussion about the feature. Given that there are now 3 PRs that accomplish the same thing, we should probably consolidate discussion in a single place.

@manicminer
Copy link
Member

@PalczynskiMaciej Thanks for submitting this PR. I appreciate that this PR, and #130 which it seems to be based on, have been outstanding for a long time, however I'm going to merge #138 for this functionality as that has additional safety checks on the resulting duration after parsing. Thanks again for working on this.

@manicminer
Copy link
Member

Duplicate of #138

@manicminer manicminer marked this as a duplicate of #138 May 9, 2024
@manicminer manicminer closed this May 9, 2024
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.

None yet

4 participants