Skip to content

retry_after value is not reset crossing multiple requests for the same curl object #5661

@JoeyLiang-0

Description

@JoeyLiang-0

When using the same curl object to make multiple requests, the retry_after value is not reset before the request while all others from PureInfo are reset correctly. If some responses have retry-after header but some responses do not, the responses without retry-after header will carry the retry-after value from previous request/response.
The patch attached.

diff --git a/lib/getinfo.c b/lib/getinfo.c
index 6d5bd5fc5..35b27ea20 100644
--- a/lib/getinfo.c
+++ b/lib/getinfo.c
@@ -81,6 +81,7 @@ CURLcode Curl_initinfo(struct Curl_easy *data)
 
   info->conn_scheme = 0;
   info->conn_protocol = 0;
+  info->retry_after = 0;
 
 #ifdef USE_SSL
   Curl_ssl_free_certinfo(data);

curl-retry-after.patch.txt

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions