diff options
| author | Pavel Březina <pbrezina@redhat.com> | 2017-02-24 12:23:22 +0100 |
|---|---|---|
| committer | Lukas Slebodnik <lslebodn@redhat.com> | 2017-03-30 19:06:56 +0200 |
| commit | 36e49a842e257ac9bde71728ee3bef4299b6e6e2 (patch) | |
| tree | f303859ae010b782412681c75f3a50d44bc487a2 /src | |
| parent | b800a6d09244359959404aca81c6796a58cafbcb (diff) | |
| download | sssd-36e49a842e257ac9bde71728ee3bef4299b6e6e2.tar.gz sssd-36e49a842e257ac9bde71728ee3bef4299b6e6e2.tar.xz sssd-36e49a842e257ac9bde71728ee3bef4299b6e6e2.zip | |
tcurl test: add support for raw output
Reviewed-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/tests/tcurl_test_tool.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/tests/tcurl_test_tool.c b/src/tests/tcurl_test_tool.c index e5fc9705d..7d3bc19f0 100644 --- a/src/tests/tcurl_test_tool.c +++ b/src/tests/tcurl_test_tool.c @@ -36,6 +36,7 @@ struct tool_ctx { struct tool_options { int debug; int verbose; + int raw; enum tcurl_http_method method; const char *socket_path; @@ -173,6 +174,13 @@ prepare_requests(TALLOC_CTX *mem_ctx, goto done; } + if (opts->raw) { + ret = tcurl_req_enable_rawoutput(requests[i]); + if (ret != EOK) { + goto done; + } + } + i++; } @@ -270,6 +278,7 @@ int main(int argc, const char *argv[]) { "put", 'p', POPT_ARG_NONE, NULL, 'p', "Perform a HTTP PUT", NULL }, { "post", 'o', POPT_ARG_NONE, NULL, 'o', "Perform a HTTP POST", NULL }, { "del", 'd', POPT_ARG_NONE, NULL, 'd', "Perform a HTTP DELETE", NULL }, + { "raw", 'r', POPT_ARG_NONE, &opts.raw, '\0', "Print raw protocol output", NULL }, { "verbose", 'v', POPT_ARG_NONE, &opts.verbose, '\0', "Print response code and body", NULL }, POPT_TABLEEND }; |
