gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libmicrohttpd] 10/10: testcurl/https: minor improvements


From: gnunet
Subject: [libmicrohttpd] 10/10: testcurl/https: minor improvements
Date: Thu, 13 Oct 2022 08:40:50 +0200

This is an automated email from the git hooks/post-receive script.

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

commit 778e2a031eef582e0bdd45c47a018ffb0f32781a
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Wed Oct 12 19:19:53 2022 +0300

    testcurl/https: minor improvements
---
 src/testcurl/https/test_https_get.c       | 7 +++++++
 src/testcurl/https/test_https_get_iovec.c | 7 +++++++
 2 files changed, 14 insertions(+)

diff --git a/src/testcurl/https/test_https_get.c 
b/src/testcurl/https/test_https_get.c
index b18fc878..f3f0e1f5 100644
--- a/src/testcurl/https/test_https_get.c
+++ b/src/testcurl/https/test_https_get.c
@@ -143,6 +143,12 @@ curlExcessFound (CURL *c,
   const size_t str_size = strlen (excess_found);
   (void) c;      /* Unused. Silence compiler warning. */
 
+#ifdef _DEBUG
+  if ((CURLINFO_TEXT == type) ||
+      (CURLINFO_HEADER_IN == type) ||
+      (CURLINFO_HEADER_OUT == type))
+    fprintf (stderr, "%.*s", (int) size, data);
+#endif /* _DEBUG */
   if ((CURLINFO_TEXT == type)
       && (size >= str_size)
       && (0 == strncmp (excess_found, data, str_size)))
@@ -196,6 +202,7 @@ testEmptyGet (unsigned int poll_flag)
   curl_easy_setopt (c, CURLOPT_VERBOSE, 1L);
 #endif
   curl_easy_setopt (c, CURLOPT_URL, "https://127.0.0.1/";);
+  curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
   curl_easy_setopt (c, CURLOPT_PORT, (long) global_port);
   curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
   curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
diff --git a/src/testcurl/https/test_https_get_iovec.c 
b/src/testcurl/https/test_https_get_iovec.c
index 326dd8da..33a2e326 100644
--- a/src/testcurl/https/test_https_get_iovec.c
+++ b/src/testcurl/https/test_https_get_iovec.c
@@ -301,6 +301,12 @@ curlExcessFound (CURL *c,
   const size_t str_size = strlen (excess_found);
   (void) c;      /* Unused. Silence compiler warning. */
 
+#ifdef _DEBUG
+  if ((CURLINFO_TEXT == type) ||
+      (CURLINFO_HEADER_IN == type) ||
+      (CURLINFO_HEADER_OUT == type))
+    fprintf (stderr, "%.*s", (int) size, data);
+#endif /* _DEBUG */
   if ((CURLINFO_TEXT == type)
       && (size >= str_size)
       && (0 == strncmp (excess_found, data, str_size)))
@@ -355,6 +361,7 @@ testEmptyGet (unsigned int poll_flag)
 #endif
   curl_easy_setopt (c, CURLOPT_URL, "https://127.0.0.1/";);
   curl_easy_setopt (c, CURLOPT_PORT, (long) global_port);
+  curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
   curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
   curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
   curl_easy_setopt (c, CURLOPT_DEBUGFUNCTION, &curlExcessFound);

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]