Blame SOURCES/0076-tcurl-test-add-support-for-raw-output.patch

ecf709
From 961abf2d35e296fe2b12b2b48c5d3fc67c0bc779 Mon Sep 17 00:00:00 2001
ecf709
From: =?UTF-8?q?Pavel=20B=C5=99ezina?= <pbrezina@redhat.com>
ecf709
Date: Fri, 24 Feb 2017 12:23:22 +0100
ecf709
Subject: [PATCH 76/90] tcurl test: add support for raw output
ecf709
ecf709
Reviewed-by: Simo Sorce <simo@redhat.com>
ecf709
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
ecf709
(cherry picked from commit 36e49a842e257ac9bde71728ee3bef4299b6e6e2)
ecf709
---
ecf709
 src/tests/tcurl_test_tool.c | 9 +++++++++
ecf709
 1 file changed, 9 insertions(+)
ecf709
ecf709
diff --git a/src/tests/tcurl_test_tool.c b/src/tests/tcurl_test_tool.c
ecf709
index e5fc9705db415650d849b89c3d18e41574b7e28b..7d3bc19f0ec7e118e251247536d25c58fe009f54 100644
ecf709
--- a/src/tests/tcurl_test_tool.c
ecf709
+++ b/src/tests/tcurl_test_tool.c
ecf709
@@ -36,6 +36,7 @@ struct tool_ctx {
ecf709
 struct tool_options {
ecf709
     int debug;
ecf709
     int verbose;
ecf709
+    int raw;
ecf709
 
ecf709
     enum tcurl_http_method method;
ecf709
     const char *socket_path;
ecf709
@@ -173,6 +174,13 @@ prepare_requests(TALLOC_CTX *mem_ctx,
ecf709
             goto done;
ecf709
         }
ecf709
 
ecf709
+        if (opts->raw) {
ecf709
+            ret = tcurl_req_enable_rawoutput(requests[i]);
ecf709
+            if (ret != EOK) {
ecf709
+                goto done;
ecf709
+            }
ecf709
+        }
ecf709
+
ecf709
         i++;
ecf709
     }
ecf709
 
ecf709
@@ -270,6 +278,7 @@ int main(int argc, const char *argv[])
ecf709
         { "put", 'p', POPT_ARG_NONE, NULL, 'p', "Perform a HTTP PUT", NULL },
ecf709
         { "post", 'o', POPT_ARG_NONE, NULL, 'o', "Perform a HTTP POST", NULL },
ecf709
         { "del", 'd', POPT_ARG_NONE, NULL, 'd', "Perform a HTTP DELETE", NULL },
ecf709
+        { "raw", 'r', POPT_ARG_NONE, &opts.raw, '\0', "Print raw protocol output", NULL },
ecf709
         { "verbose", 'v', POPT_ARG_NONE, &opts.verbose, '\0', "Print response code and body", NULL },
ecf709
         POPT_TABLEEND
ecf709
     };
ecf709
-- 
ecf709
2.9.3
ecf709