]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
http: explicitly ignore parsing errors for Retry-After
authorDaniel Stenberg <daniel@haxx.se>
Fri, 20 Jun 2025 11:38:22 +0000 (13:38 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 20 Jun 2025 19:54:27 +0000 (21:54 +0200)
Add (void) and explain in comment.

Closes #17682

lib/http.c

index a2b202f58829fea13fbb29edb62a43fe9ef86d06..112911b5f4cb20175efe01bcd95a8fe5d8e06692 100644 (file)
@@ -3293,8 +3293,8 @@ static CURLcode http_header_r(struct Curl_easy *data,
         retry_after = date - current;
     }
     else
-      /* Try it as a decimal number */
-      curlx_str_number(&v, &retry_after, CURL_OFF_T_MAX);
+      /* Try it as a decimal number, ignore errors */
+      (void)curlx_str_number(&v, &retry_after, CURL_OFF_T_MAX);
     /* limit to 6 hours max. this is not documented so that it can be changed
        in the future if necessary. */
     if(retry_after > 21600)