From 1c489f009756755a86fd4d6a555cb129e8fd8935 Mon Sep 17 00:00:00 2001 From: Christopher Zimmermann Date: Sun, 8 Feb 2026 21:10:48 -0500 Subject: [PATCH] reset easy handle before use One thing this does is reset the request method to the default, which otherwise would be stuck at any request method previously set with Curl.set_customrequest --- src/core/ezcurl_core.ml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/ezcurl_core.ml b/src/core/ezcurl_core.ml index be1cf3c..c5ef70f 100644 --- a/src/core/ezcurl_core.ml +++ b/src/core/ezcurl_core.ml @@ -399,7 +399,9 @@ module Make (IO : IO) : S with type 'a io = 'a IO.t = struct let do_cleanup, self = match client with | None -> true, make () - | Some c -> false, c + | Some c -> + Curl.reset c.curl; + false, c in _apply_config self config; opt_iter range ~f:(fun s -> Curl.set_range self.curl s);