mirror of
https://github.com/c-cube/ezcurl.git
synced 2026-03-07 21:47:55 -05:00
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
This commit is contained in:
parent
0c4e9f30e1
commit
1c489f0097
1 changed files with 3 additions and 1 deletions
|
|
@ -399,7 +399,9 @@ module Make (IO : IO) : S with type 'a io = 'a IO.t = struct
|
||||||
let do_cleanup, self =
|
let do_cleanup, self =
|
||||||
match client with
|
match client with
|
||||||
| None -> true, make ()
|
| None -> true, make ()
|
||||||
| Some c -> false, c
|
| Some c ->
|
||||||
|
Curl.reset c.curl;
|
||||||
|
false, c
|
||||||
in
|
in
|
||||||
_apply_config self config;
|
_apply_config self config;
|
||||||
opt_iter range ~f:(fun s -> Curl.set_range self.curl s);
|
opt_iter range ~f:(fun s -> Curl.set_range self.curl s);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue