From: Adam Dickmeiss Date: Fri, 10 Jan 2014 13:01:53 +0000 (+0100) Subject: yaz-url utility offers option -v to enable verbose mode X-Git-Tag: v5.0.11~5 X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=commitdiff_plain;h=a7caedd0f9ba12290619e65bd2277d54ef800e8e;hp=d0da7ea31871b3fcb3785ec7e1d06f4739fb6ada yaz-url utility offers option -v to enable verbose mode --- diff --git a/doc/yaz-url-man.xml b/doc/yaz-url-man.xml index c98c467..e3bef4a 100644 --- a/doc/yaz-url-man.xml +++ b/doc/yaz-url-man.xml @@ -35,6 +35,7 @@ -p fname -R num -u user/password + -v -x proxy url @@ -106,6 +107,13 @@ + -v + + Makes yaz-url dump each HTTP request/response to stdout. + + + + -x proxy Specifies a proxy to be used for URL fetch. diff --git a/util/yaz-url.c b/util/yaz-url.c index 5e6bbe9..7a78e67 100644 --- a/util/yaz-url.c +++ b/util/yaz-url.c @@ -23,6 +23,7 @@ static void usage(void) printf(" -p fname POSTs file at following url\n"); printf(" -R num Set maximum number of HTTP redirects\n"); printf(" -u user/password Sets Basic HTTP auth\n"); + printf(" -v Verbose\n"); printf(" -x proxy Sets HTTP proxy\n"); exit(1); } @@ -73,7 +74,7 @@ int main(int argc, char **argv) int no_urls = 0; const char *outfname = 0; - while ((ret = options("h{help}H:m:O:p:R{max-redirs}:u:x:", argv, argc, &arg)) + while ((ret = options("h{help}H:m:O:p:R{max-redirs}:u:vx:", argv, argc, &arg)) != YAZ_OPTIONS_EOF) { switch (ret) @@ -127,6 +128,9 @@ int main(int argc, char **argv) else z_HTTP_header_add_basic_auth(odr, &http_headers, arg, 0); break; + case 'v': + yaz_url_set_verbose(p, 1); + break; case 'x': yaz_url_set_proxy(p, arg); break;