Displaying 14 results from an estimated 14 matches for "forcedproxy".
2016 Jul 07
0
[PATCH 3/3] builder: Use the new Curl module for passing parameters to curl.
...--git a/builder/downloader.ml b/builder/downloader.ml
index 8c47bad..de9b404 100644
--- a/builder/downloader.ml
+++ b/builder/downloader.ml
@@ -32,29 +32,24 @@ type t = {
cache : Cache.t option; (* cache for templates *)
}
-type proxy_mode =
- | UnsetProxy
- | SystemProxy
- | ForcedProxy of string
-
let create ~curl ~cache = {
curl = curl;
cache = cache;
}
-let rec download t ?template ?progress_bar ?(proxy = SystemProxy) uri =
+let rec download t ?template ?progress_bar ?proxy uri =
match template with
| None -> (* no cache, simple download...
2016 Jul 07
4
[PATCH 0/3] Move Curl wrapper to mllib and use it for virt-builder.
Move the Curl wrapper module from virt-v2v to mllib. Use the module
when virt-builder issues curl calls.
Rich.
2016 Jul 07
0
[PATCH v3 2/8] curl: Change the API to use an abstract data type.
...rl" ".conf" in
+type t = {
+ curl : string;
+ args : args;
+}
+and args = (string * string option) list
+
+let safe_args = [
+ "max-redirs", Some "5";
+ "globoff", None; (* Don't glob URLs. *)
+]
+
+type proxy = UnsetProxy | SystemProxy | ForcedProxy of string
+
+let args_of_proxy = function
+ | UnsetProxy -> [ "proxy", Some "" ; "noproxy", Some "*" ]
+ | SystemProxy -> []
+ | ForcedProxy url -> [ "proxy", Some url; "noproxy", Some "" ]
+
+let create ?(cu...
2016 Jul 07
0
[PATCH v2 2/8] curl: Change the API to use an abstract data type.
...quot;user", Some _ -> bprintf b " --user <hidden>"
+ | name, Some value -> bprintf b " --%s %s" name (quote value)
+ ) args;
+ bprintf b "\n";
+ Buffer.contents b
+
+let print chan t = output_string chan (to_string t)
+
+type proxy = UnsetProxy | ForcedProxy of string
+
+let args_of_proxy = function
+ | UnsetProxy -> [ "proxy", Some "" ; "noproxy", Some "*" ]
+ | ForcedProxy url -> [ "proxy", Some url; "noproxy", Some "" ]
+
+let safe_args = [
+ "max-redirs",...
2019 Jan 16
0
[PATCH 4/5] mltools: curl: turn Curl.run to raise exceptions
...%d") url code
+ in
+ run_main_and_handle_errors main_wrap
diff --git a/common/mltools/curl.ml b/common/mltools/curl.ml
index 6dba97534..eb32a4748 100644
--- a/common/mltools/curl.ml
+++ b/common/mltools/curl.ml
@@ -40,6 +40,8 @@ let args_of_proxy = function
| SystemProxy -> []
| ForcedProxy url -> [ "proxy", Some url; "noproxy", Some "" ]
+exception Curl_failed of (int * string) (* exit code, URL *)
+
let create ?(curl = "curl") ?(proxy = SystemProxy) ?tmpdir args =
let args = safe_args @ args_of_proxy proxy @ args in
{ curl = curl;...
2016 Jul 07
9
[PATCH v2 0/8] v2v: Move Curl wrapper to mllib and use it for virt-builder (and more).
v1 -> v2:
- Fixed the bug with precedence of if / @.
- Add some imperative list operators inspired by Perl, and use those
for constructing the Curl arguments, and more.
Rich.
2016 Oct 25
2
[PATCH v2 1/2] mllib: curl: add optional tmpdir parameter
...5ec 100644
--- a/mllib/curl.ml
+++ b/mllib/curl.ml
@@ -25,6 +25,7 @@ let quote = Filename.quote
type t = {
curl : string;
args : args;
+ tmpdir : string option;
}
and args = (string * string option) list
@@ -40,12 +41,13 @@ let args_of_proxy = function
| SystemProxy -> []
| ForcedProxy url -> [ "proxy", Some url; "noproxy", Some "" ]
-let create ?(curl = "curl") ?(proxy = SystemProxy) args =
+let create ?(curl = "curl") ?(proxy = SystemProxy) ?tmpdir args =
let args = safe_args @ args_of_proxy proxy @ args in
- { curl = c...
2016 Jul 07
12
[PATCH v3 0/8] v2v: Move Curl wrapper to mllib and more.
v2 -> v3:
- Changes to the Curl API suggested by Pino.
2016 Oct 24
2
[PATCH 1/2] mllib: curl: add optional tmpdir parameter
...125 100644
--- a/mllib/curl.ml
+++ b/mllib/curl.ml
@@ -25,6 +25,7 @@ let quote = Filename.quote
type t = {
curl : string;
args : args;
+ tmpdir : string option;
}
and args = (string * string option) list
@@ -40,12 +41,13 @@ let args_of_proxy = function
| SystemProxy -> []
| ForcedProxy url -> [ "proxy", Some url; "noproxy", Some "" ]
-let create ?(curl = "curl") ?(proxy = SystemProxy) args =
+let create ?(curl = "curl") ?(proxy = SystemProxy) ?tmpdir args =
let args = safe_args @ args_of_proxy proxy @ args in
- { curl = c...
2019 Jan 16
10
[PATCH 0/5] [RFC] builder: handle unavailable repos
In case a repository of virt-builder references files (e.g. the index)
that cannot be downloaded (network issues, 404, etc) then virt-builder
errors out on this situation. This is not a nice situation, from an user
POV.
This series does some refactoring to allow to better handle downloading
failures, and handle the failures gracefully in virt-builder.
RFC because I'm not yet too convinced
2017 Oct 04
11
[PATCH 0/9] build: Require OCaml >= 4.02.
Per my previous email:
https://www.redhat.com/archives/libguestfs/2017-September/msg00203.html
I'd like to talk about requiring a more modern version of the OCaml
compiler.
These commits show some of the code changes which would be possible
with OCaml >= 3.12 [which it turns out we already require by accident]
and also with OCaml >= 4.02. The latter is my favoured option.
Rich.
2015 May 15
0
[PATCH 3/4] ocaml tools: Use global variables to store trace (-x) and verbose (-v) flags.
...0644
--- a/builder/downloader.ml
+++ b/builder/downloader.ml
@@ -28,7 +28,6 @@ type uri = string
type filename = string
type t = {
- verbose : bool;
curl : string;
cache : Cache.t option; (* cache for templates *)
}
@@ -38,8 +37,7 @@ type proxy_mode =
| SystemProxy
| ForcedProxy of string
-let create ~verbose ~curl ~cache = {
- verbose = verbose;
+let create ~curl ~cache = {
curl = curl;
cache = cache;
}
@@ -88,7 +86,7 @@ and download_to t ?(progress_bar = false) ~proxy uri filename =
| "file" ->
let path = parseduri.URI.path in
let cmd...
2015 May 15
5
[PATCH 0/4] Only tell people to use -v -x when reporting bugs if they're not using those flags.
.. and a lot of refactoring.
https://bugzilla.redhat.com/show_bug.cgi?id=1167623
Rich.
2015 May 15
6
[PATCH v2 0/4] Only tell people to use -v -x when reporting bugs if they're not using those flags.
https://bugzilla.redhat.com/show_bug.cgi?id=1167623