aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/daemontest_get.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/daemon/daemontest_get.c')
-rw-r--r--src/daemon/daemontest_get.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/daemon/daemontest_get.c b/src/daemon/daemontest_get.c
index d4030b06..3cd158ff 100644
--- a/src/daemon/daemontest_get.c
+++ b/src/daemon/daemontest_get.c
@@ -61,9 +61,10 @@ static size_t copyBuffer(void * ptr,
61} 61}
62 62
63static int ahc_echo(void * cls, 63static int ahc_echo(void * cls,
64 struct MHD_Session * session, 64 struct MHD_Connection * connection,
65 const char * url, 65 const char * url,
66 const char * method, 66 const char * method,
67 const char * version,
67 const char * upload_data, 68 const char * upload_data,
68 unsigned int * upload_data_size) { 69 unsigned int * upload_data_size) {
69 const char * me = cls; 70 const char * me = cls;
@@ -76,7 +77,7 @@ static int ahc_echo(void * cls,
76 (void*) url, 77 (void*) url,
77 MHD_NO, 78 MHD_NO,
78 MHD_YES); 79 MHD_YES);
79 ret = MHD_queue_response(session, 80 ret = MHD_queue_response(connection,
80 MHD_HTTP_OK, 81 MHD_HTTP_OK,
81 response); 82 response);
82 MHD_destroy_response(response); 83 MHD_destroy_response(response);
@@ -93,12 +94,13 @@ static int testInternalGet() {
93 cbc.buf = buf; 94 cbc.buf = buf;
94 cbc.size = 2048; 95 cbc.size = 2048;
95 cbc.pos = 0; 96 cbc.pos = 0;
96 d = MHD_start_daemon(MHD_USE_SELECT_INTERNALLY | MHD_USE_IPv4 | MHD_USE_DEBUG, 97 d = MHD_start_daemon(MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG,
97 1080, 98 1080,
98 &apc_all, 99 &apc_all,
99 NULL, 100 NULL,
100 &ahc_echo, 101 &ahc_echo,
101 "GET"); 102 "GET",
103 MHD_OPTION_END);
102 if (d == NULL) 104 if (d == NULL)
103 return 1; 105 return 1;
104 c = curl_easy_init(); 106 c = curl_easy_init();
@@ -157,12 +159,13 @@ static int testMultithreadedGet() {
157 cbc.buf = buf; 159 cbc.buf = buf;
158 cbc.size = 2048; 160 cbc.size = 2048;
159 cbc.pos = 0; 161 cbc.pos = 0;
160 d = MHD_start_daemon(MHD_USE_THREAD_PER_CONNECTION | MHD_USE_IPv4 | MHD_USE_DEBUG, 162 d = MHD_start_daemon(MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG,
161 1081, 163 1081,
162 &apc_all, 164 &apc_all,
163 NULL, 165 NULL,
164 &ahc_echo, 166 &ahc_echo,
165 "GET"); 167 "GET",
168 MHD_OPTION_END);
166 if (d == NULL) 169 if (d == NULL)
167 return 16; 170 return 16;
168 c = curl_easy_init(); 171 c = curl_easy_init();
@@ -231,12 +234,13 @@ static int testExternalGet() {
231 cbc.buf = buf; 234 cbc.buf = buf;
232 cbc.size = 2048; 235 cbc.size = 2048;
233 cbc.pos = 0; 236 cbc.pos = 0;
234 d = MHD_start_daemon(MHD_USE_IPv4 | MHD_USE_DEBUG, 237 d = MHD_start_daemon(MHD_USE_DEBUG,
235 1082, 238 1082,
236 &apc_all, 239 &apc_all,
237 NULL, 240 NULL,
238 &ahc_echo, 241 &ahc_echo,
239 "GET"); 242 "GET",
243 MHD_OPTION_END);
240 if (d == NULL) 244 if (d == NULL)
241 return 256; 245 return 256;
242 c = curl_easy_init(); 246 c = curl_easy_init();