From fe35e81fe0e6c453091aeb97bfdfaddd59cd5722 Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Wed, 29 Sep 2021 08:54:04 -0400 Subject: [PATCH] minor changes to improve compatibility --- src/core/Ezcurl_core.ml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/Ezcurl_core.ml b/src/core/Ezcurl_core.ml index 9412fce..25ad51c 100644 --- a/src/core/Ezcurl_core.ml +++ b/src/core/Ezcurl_core.ml @@ -18,7 +18,7 @@ module Config = struct authmethod=None; username=None; password=None; - user_agent=Some "Ezcurl"; + user_agent=Some "curl"; } let password x self = {self with password=Some x} @@ -47,7 +47,7 @@ module Config = struct } = self in Format.fprintf out "{@[verbose=%B;@ max_redirects=%d;@ follow_location=%B;@ \ - username=%s;@ password=%s;@ authmethod=%s; user_agent=%s@]}" + username=%s;@ password=%s;@ authmethod=%s;@ user_agent=%s@]}" verbose max_redirects follow_location (str_of_str_opt username) (str_of_str_opt password) (match authmethod with @@ -82,7 +82,7 @@ let _apply_config (self:t) (config:Config.t) : unit = Curl.set_verbose self verbose; Curl.set_maxredirs self max_redirects; Curl.set_followlocation self follow_location; - Option.iter (fun user_agent -> Curl.set_useragent self user_agent) user_agent; + opt_iter (fun user_agent -> Curl.set_useragent self user_agent) user_agent; opt_iter authmethod ~f:(Curl.set_httpauth self); opt_iter username ~f:(Curl.set_username self); opt_iter password ~f:(Curl.set_password self);