diff --git a/liboctave/util/url-transfer.cc b/liboctave/util/url-transfer.cc index 68a49127e2..a59490d5fb 100644 --- a/liboctave/util/url-transfer.cc +++ b/liboctave/util/url-transfer.cc @@ -746,7 +746,8 @@ class curl_transfer : public base_url_transfer set_header_fields (options.HeaderFields); - SETOPT (CURLOPT_TIMEOUT, options.Timeout); + SETOPT (CURLOPT_TIMEOUT_MS, options.Timeout); + SETOPT (CURLOPT_CONNECTTIMEOUT_MS, options.Timeout); if (! options.UserAgent.empty ()) SETOPT (CURLOPT_USERAGENT, options.UserAgent.c_str ()); diff --git a/scripts/web/webread.m b/scripts/web/webread.m index 5492216cab..a1e0caedc7 100644 --- a/scripts/web/webread.m +++ b/scripts/web/webread.m @@ -86,14 +86,14 @@ ## Flatten the cell array because the internal processing takes place on ## a flattened array. - options.HeaderFields = options.HeaderFields(:)'; + options.HeaderFields = options.HeaderFields(:).'; nargs = 1 + numel (varargin); if (nargs == 1) response = __restful_service__ (url, cell (), options); elseif (rem (nargs, 2) == 1) if (! iscellstr (varargin)) - error ("webwrite: KEYS and VALUES must be strings"); + error ("webread: KEYS and VALUES must be strings"); else response = __restful_service__ (url, varargin, options); endif