aboutsummaryrefslogtreecommitdiff
path: root/src/testcurl/test_get.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-10-26 18:52:53 +0200
committerChristian Grothoff <christian@grothoff.org>2019-10-26 18:52:53 +0200
commit5e5dbf980de763480f7957f64af78bbb2159d9a0 (patch)
treec769f03c3d7b78df899023ff4366042670ca23f8 /src/testcurl/test_get.c
parentb8516d23ba11cf3a94fcbf2ea228ea0456354017 (diff)
downloadlibmicrohttpd-5e5dbf980de763480f7957f64af78bbb2159d9a0.tar.gz
libmicrohttpd-5e5dbf980de763480f7957f64af78bbb2159d9a0.zip
add tests for empty reply in HTTPS
Diffstat (limited to 'src/testcurl/test_get.c')
-rw-r--r--src/testcurl/test_get.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/testcurl/test_get.c b/src/testcurl/test_get.c
index dee5a9c1..09cae5f6 100644
--- a/src/testcurl/test_get.c
+++ b/src/testcurl/test_get.c
@@ -719,14 +719,19 @@ ahc_empty (void *cls,
719 const char *url, 719 const char *url,
720 const char *method, 720 const char *method,
721 const char *version, 721 const char *version,
722 const char *upload_data, size_t *upload_data_size, 722 const char *upload_data,
723 size_t *upload_data_size,
723 void **unused) 724 void **unused)
724{ 725{
725 static int ptr; 726 static int ptr;
726 struct MHD_Response *response; 727 struct MHD_Response *response;
727 int ret; 728 int ret;
728 (void) cls; (void) url; (void) url; (void) version; /* Unused. Silent compiler warning. */ 729 (void) cls;
729 (void) upload_data; (void) upload_data_size; /* Unused. Silent compiler warning. */ 730 (void) url;
731 (void) url;
732 (void) version; /* Unused. Silent compiler warning. */
733 (void) upload_data;
734 (void) upload_data_size; /* Unused. Silent compiler warning. */
730 735
731 if (0 != strcasecmp ("GET", method)) 736 if (0 != strcasecmp ("GET", method))
732 return MHD_NO; /* unexpected method */ 737 return MHD_NO; /* unexpected method */
@@ -739,7 +744,9 @@ ahc_empty (void *cls,
739 response = MHD_create_response_from_buffer (0, 744 response = MHD_create_response_from_buffer (0,
740 NULL, 745 NULL,
741 MHD_RESPMEM_PERSISTENT); 746 MHD_RESPMEM_PERSISTENT);
742 ret = MHD_queue_response (connection, MHD_HTTP_OK, response); 747 ret = MHD_queue_response (connection,
748 MHD_HTTP_OK,
749 response);
743 MHD_destroy_response (response); 750 MHD_destroy_response (response);
744 if (ret == MHD_NO) 751 if (ret == MHD_NO)
745 { 752 {
@@ -751,7 +758,10 @@ ahc_empty (void *cls,
751 758
752 759
753static int 760static int
754curlExcessFound (CURL *c, curl_infotype type, char *data, size_t size, 761curlExcessFound (CURL *c,
762 curl_infotype type,
763 char *data,
764 size_t size,
755 void *cls) 765 void *cls)
756{ 766{
757 static const char *excess_found = "Excess found"; 767 static const char *excess_found = "Excess found";