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

Honor 429 HTTP Code / Retry-After header #3794

Closed
john-hascall opened this issue Apr 19, 2019 · 7 comments

Comments

@john-hascall
Copy link

commented Apr 19, 2019

The command line client's --retry option should recognize and honor the 429 HTTP status return and the accompanying 'Retry-After' header.

Affects all versions, but I happen to be running:

curl 7.29.0 (x86_64-redhat-linux-gnu) libcurl/7.29.0 NSS/3.28.4 zlib/1.2.7 libidn/1.28 libssh2/1.4.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smtp smtps telnet tftp
Features: AsynchDNS GSS-Negotiate IDN IPv6 Largefile NTLM NTLM_WB SSL libz unix-sockets

on:

Linux 3.10.0-514.26.2.el7.x86_64 #1 SMP Fri Jun 30 05:26:04 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

@bagder

This comment has been minimized.

Copy link
Member

commented Apr 19, 2019

I reasonable suggestion methinks, even if that's a very rarely used response code and header...

@john-hascall

This comment has been minimized.

Copy link
Author

commented Apr 19, 2019

@bagder

This comment has been minimized.

Copy link
Member

commented May 3, 2019

I want to address this issue after #3804 has gone in, just to save me from having to do double work.

@wmark

This comment has been minimized.

Copy link
Contributor

commented Jul 25, 2019

At least one server written in Golang does sent this. It's used when it runs out of file descriptors.

Another sensible use is in anything that runs in the cloud, hits a resource limit (clouds are made of rigid boxes), and cold-start times are known.

@bagder

This comment has been minimized.

Copy link
Member

commented Aug 6, 2019

@john-hascall

This comment has been minimized.

Copy link
Author

commented Aug 6, 2019

bagder added a commit that referenced this issue Aug 6, 2019

CURLINFO_RETRY_AFTER: parse the Retry-Header value and offer it
This is only the libcurl part that provides the information. There's no
user of the parsed value. This change includes three new tests for the
parser.

Ref: #3794

bagder added a commit that referenced this issue Aug 6, 2019

CURLINFO_RETRY_AFTER: parse the Retry-After header value
This is only the libcurl part that provides the information. There's no
user of the parsed value. This change includes three new tests for the
parser.

Ref: #3794

bagder added a commit that referenced this issue Aug 6, 2019

CURLINFO_RETRY_AFTER: parse the Retry-After header value
This is only the libcurl part that provides the information. There's no
user of the parsed value. This change includes three new tests for the
parser.

Ref: #3794

bagder added a commit that referenced this issue Aug 6, 2019

CURLINFO_RETRY_AFTER: parse the Retry-After header value
This is only the libcurl part that provides the information. There's no
user of the parsed value. This change includes three new tests for the
parser.

Ref: #3794

bagder added a commit that referenced this issue Aug 6, 2019

curl: make use of CURLINFO_RETRY_AFTER when retrying
If a Retry-After: header was used in the response, that value overrides
other retry timing options.

Closes #3794

bagder added a commit that referenced this issue Aug 7, 2019

CURLINFO_RETRY_AFTER: parse the Retry-After header value
This is only the libcurl part that provides the information. There's no
user of the parsed value. This change includes three new tests for the
parser.

Ref: #3794

@bagder bagder closed this in 640b973 Aug 7, 2019

@john-hascall

This comment has been minimized.

Copy link
Author

commented Aug 8, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.