Skip to content

Retry-After handling does not honor --retry-max-time #7675

Closed
@kaol

Description

@kaol

I did this

I made this nginx config to test this out:

location /503/ {
  add_header Retry-After 86400 always;
  return 503;
}
location /503-2/ {
  return 503;
}

My command:

curl -i -m 5 --retry 2 http://localhost/503/

I expected the following

The command to fail within five seconds, not within 3 days. If the Retry-After time is after max-time's limit, it should fail immediately.

curl/libcurl version

curl 7.74.0 (x86_64-pc-linux-gnu) libcurl/7.74.0 OpenSSL/1.1.1l zlib/1.2.11 brotli/1.0.9 libidn2/2.3.2 libpsl/0.21.0 (+libidn2/2.3.0) libssh2/1.9.0 nghttp2/1.43.0 librtmp/2.3
Release-Date: 2020-12-09
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps mqtt pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS brotli GSS-API HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM NTLM_WB PSL SPNEGO SSL TLS-SRP UnixSockets

Not the newest version but I saw no mentions of max-time or Retry-After in the changelog.

operating system

Linux sammakko3 5.10.0-8-amd64 #1 SMP Debian 5.10.46-4 (2021-08-03) x86_64 GNU/Linux

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions