Commit 54bc1be
committed
net: CurlHttpClient: Call
@okman334 reported an error when using the curl HTTP client after commit
775291f ("net: Allow curl handle in CurlHttpClient to be kept alive"):
error: curl error: Send failed since rewinding of the data stream failed.
Fix this by calling `curl_easy_reset()` before setting curl options. It
reinitializes all options previously set on a specified curl handle to
the default values while keeping the connection alive.
Also, move the timeout options setting below the reset call to avoid
losing the timeout options effect.
Closes: #340
Reported-by: @okman334
Fixes: 775291f ("net: Allow curl handle in CurlHttpClient to be kept alive")
Signed-off-by: Ammar Faizi <ammarfaizi2@gnuweeb.org>curl_easy_reset() to fix error 'rewinding of the data'1 parent 84e93a1 commit 54bc1be
1 file changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
33 | 31 | | |
34 | 32 | | |
35 | 33 | | |
| |||
45 | 43 | | |
46 | 44 | | |
47 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
0 commit comments