search for: http_code

Displaying 20 results from an estimated 21 matches for "http_code".

2015 Sep 08
0
[PATCH 1/2] Allow curl to follow redirects.
...,7 @@ and download_to t ?(progress_bar = false) ~proxy uri filename = | _ as protocol -> (* Any other protocol. *) let outenv = proxy_envvar protocol proxy in (* Get the status code first to ensure the file exists. *) - let cmd = sprintf "%s%s%s -g -o /dev/null -I -w '%%{http_code}' %s" + let cmd = sprintf "%s%s%s -L --max-redirs 5 -g -o /dev/null -I -w '%%{http_code}' %s" outenv t.curl (if verbose () then "" else " -s -S") @@ -114,7 +114,7 @@ and download_to t ?(progress_bar = false) ~proxy uri filename...
2014 Feb 11
4
[PATCH 0/3] virt-builder: copy local files instead of using curl
Hi, this patch serie does a small optimisation in virt-builder, i.e. make its internal Downloader just copy files when the source is a local URI, instead of spawn curl in this case too. Pino Toscano (3): builder: isolate C libraries in an own OCAMLCLIBS builder: prepare for different per-protocol download actions builder: do a copy when downloading local files builder/Makefile.am | 13
2016 Jul 07
0
[PATCH v3 5/8] builder, v2v: Use imperative list functions to simplify curl arg code.
...ose () then [] else quiet_args) @ [ - "output", Some "/dev/null"; (* Write output to /dev/null. *) - "head", None; (* Request only HEAD. *) - (* Write HTTP status code to stdout. *) - "write-out", Some "%{http_code}"; - "url", Some uri - ] in + let curl_args = ref common_args in + if not (verbose ()) then append curl_args quiet_args; + append curl_args [ + "output", Some "/dev/null"; (* Write output to /dev/null. *) + "head&q...
2019 Jan 07
1
icecast2 HEAD method support
I need to monitor individual stream availability, and parsing XMLs is too much complex. Currently I use: curl -s --max-time 1 -w '%{http_code}' -o /dev/null http://somehost/stream.mp3 | grep -q 200 2019/1/7 17:19, Philipp Schafft: > Good morning, > > On Mon, 2019-01-07 at 15:17 +0800, Dingyuan Wang wrote: >> Hello, >> >> Currently sending a HEAD request to an icecast2 server returns a 400. > > Yes...
2015 Sep 08
5
[PATCH 0/2] virt-builder OpenSUSE images
Hi guys, Here are two patches to get opensuse images in virt-builder. Cédric Bosdonnat (2): Allow curl to follow redirects. builder: add opensuse images sources builder/Makefile.am | 3 ++- builder/downloader.ml | 4 ++-- builder/opensuse.conf.in | 3 +++ builder/opensuse.gpg | 21 +++++++++++++++++++++ configure.ac | 1 + 5 files changed, 29 insertions(+), 3
2016 Jul 07
0
[PATCH 3/3] builder: Use the new Curl module for passing parameters to curl.
...-> [] + | Some proxy -> Curl.args_of_proxy proxy in + + let quiet_args = [ "silent", None; "show-error", None ] in + (* Get the status code first to ensure the file exists. *) - let cmd = sprintf "%s%s%s -L --max-redirs 5 -g -o /dev/null -I -w '%%{http_code}' %s" - outenv - t.curl - (if verbose () then "" else " -s -S") - (quote uri) in - let lines = external_command cmd in + let curl_h = + let curl_args = + common_args @ + if verbose () then [] else quiet_args @ [ + &q...
2017 Jan 22
2
fts_solr and connection via https://
...ilbox INBOX: Status lookup failed: Internal error occurred. Refer to server log for more information. [2017-01-22 09:52:38] Segmentation fault Contacting the index server via curl on the command line on the same host works, it returns HTTP 200: user at host ~ $ curl -s -o /dev/null -w "%{http_code}" https://foo.example.com/solr/ 200 user at host ~ $ Currently I have the following ssl related settings: user at host ~ $ doveconf -n -P | grep -i ssl ssl_cert = </etc/ssl/certs/mail.example.org.crt ssl_cipher_list = ALL:!LOW:!SSLv2:ALL:!aNULL:!ADH:!eNULL:!EXP:RC4+RSA:+HIGH:+MEDIUM ss...
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.
2019 Jan 07
2
icecast2 HEAD method support
Hello, Currently sending a HEAD request to an icecast2 server returns a 400. Are there plans to implement HEAD support, in order to simplify server status monitoring for example?
2016 Oct 24
0
[PATCH 2/2] builder: consolidate handling of temporary files/dirs
...let tmpfile = Filename.temp_file ~temp_dir:t.tmpdir "vbcache" ".txt" in download_to t ?progress_bar ~proxy uri tmpfile; (tmpfile, true) @@ -107,7 +109,7 @@ and download_to t ?(progress_bar = false) ~proxy uri filename = "write-out", Some "%{http_code}" (* HTTP status code to stdout. *) ]; - Curl.create ~curl:t.curl !curl_args in + Curl.create ~curl:t.curl ~tmpdir:t.tmpdir !curl_args in let lines = Curl.run curl_h in if List.length lines < 1 then @@ -132,7 +134,7 @@ and download_to t ?(progress_bar = false)...
2016 Oct 25
0
[PATCH v2 2/2] builder: consolidate handling of temporary files/dirs
...let tmpfile = Filename.temp_file ~temp_dir:t.tmpdir "vbcache" ".txt" in download_to t ?progress_bar ~proxy uri tmpfile; (tmpfile, true) @@ -107,7 +109,7 @@ and download_to t ?(progress_bar = false) ~proxy uri filename = "write-out", Some "%{http_code}" (* HTTP status code to stdout. *) ]; - Curl.create ~curl:t.curl !curl_args in + Curl.create ~curl:t.curl ~tmpdir:t.tmpdir !curl_args in let lines = Curl.run curl_h in if List.length lines < 1 then @@ -132,7 +134,7 @@ and download_to t ?(progress_bar = false)...
2016 Oct 25
2
[PATCH v2 1/2] mllib: curl: add optional tmpdir parameter
Add a new optional parameter for the Curl ADT, so temporary files can be created in a specified directory (which is supposed to be temporary, and disposed only when the application quits). --- mllib/curl.ml | 10 ++++++---- mllib/curl.mli | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/mllib/curl.ml b/mllib/curl.ml index 376406e..baa75ec 100644 --- a/mllib/curl.ml +++
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
Add a new optional parameter for the Curl ADT, so temporary files can be created in a specified directory (which is supposed to be temporary, and disposed only when the application quits). --- mllib/curl.ml | 16 +++++++++++----- mllib/curl.mli | 2 +- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/mllib/curl.ml b/mllib/curl.ml index 376406e..7d07125 100644 --- a/mllib/curl.ml
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.
2017 Nov 21
2
[PATCH v3 0/2] common/mlstdutils: Extend the List module.
v2 -> v3: - Renamed List.assoc_ -> List.assoc_lbl. - Rebased on top of current master branch. Rich.
2017 Oct 08
4
[PATCH 0/3] common/mlstdutils: Add Std_utils List and Option modules.
In Std_utils we already extend Char and String. These commits take it a little further by extending List and adding a new Option submodule. All basically simple refactoring. Rich.
2017 Oct 08
7
[[PATCH v2 0/4] common/mlstdutils: Add Std_utils List and Option modules.
This time including the first commit ...
2015 May 15
0
[PATCH 3/4] ocaml tools: Use global variables to store trace (-x) and verbose (-v) flags.
...erbose () then " -v" else "") (quote path) (quote filename_new) in let r = Sys.command cmd in if r <> 0 then @@ -99,9 +97,9 @@ and download_to t ?(progress_bar = false) ~proxy uri filename = let cmd = sprintf "%s%s%s -g -o /dev/null -I -w '%%{http_code}' %s" outenv t.curl - (if t.verbose then "" else " -s -S") + (if verbose () then "" else " -s -S") (quote uri) in - if t.verbose then printf "%s\n%!" cmd; + if verbose () then printf "%s\n%!" c...
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.