diff options
Diffstat (limited to 'src/testcurl/test_process_headers.c')
-rw-r--r-- | src/testcurl/test_process_headers.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/testcurl/test_process_headers.c b/src/testcurl/test_process_headers.c index 98b08fbc..0c9d6133 100644 --- a/src/testcurl/test_process_headers.c +++ b/src/testcurl/test_process_headers.c | |||
@@ -92,13 +92,13 @@ ahc_echo (void *cls, | |||
92 | void **req_cls) | 92 | void **req_cls) |
93 | { | 93 | { |
94 | static int ptr; | 94 | static int ptr; |
95 | const char *me = cls; | ||
96 | struct MHD_Response *response; | 95 | struct MHD_Response *response; |
97 | enum MHD_Result ret; | 96 | enum MHD_Result ret; |
98 | const char *hdr; | 97 | const char *hdr; |
98 | (void) cls; | ||
99 | (void) version; (void) upload_data; (void) upload_data_size; /* Unused. Silent compiler warning. */ | 99 | (void) version; (void) upload_data; (void) upload_data_size; /* Unused. Silent compiler warning. */ |
100 | 100 | ||
101 | if (0 != strcmp (me, method)) | 101 | if (0 != strcmp (MHD_HTTP_METHOD_GET, method)) |
102 | return MHD_NO; /* unexpected method */ | 102 | return MHD_NO; /* unexpected method */ |
103 | if (&ptr != *req_cls) | 103 | if (&ptr != *req_cls) |
104 | { | 104 | { |
@@ -128,9 +128,8 @@ ahc_echo (void *cls, | |||
128 | if ((hdr == NULL) || (0 != strcmp (hdr, "NowPresent"))) | 128 | if ((hdr == NULL) || (0 != strcmp (hdr, "NowPresent"))) |
129 | abort (); | 129 | abort (); |
130 | 130 | ||
131 | response = MHD_create_response_from_buffer (strlen (url), | 131 | response = MHD_create_response_from_buffer_copy (strlen (url), |
132 | (void *) url, | 132 | (const void *) url); |
133 | MHD_RESPMEM_MUST_COPY); | ||
134 | if (NULL == response) | 133 | if (NULL == response) |
135 | abort (); | 134 | abort (); |
136 | MHD_add_response_header (response, "MyHeader", "MyValue"); | 135 | MHD_add_response_header (response, "MyHeader", "MyValue"); |
@@ -176,7 +175,7 @@ testInternalGet () | |||
176 | cbc.size = 2048; | 175 | cbc.size = 2048; |
177 | cbc.pos = 0; | 176 | cbc.pos = 0; |
178 | d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG, | 177 | d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG, |
179 | port, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END); | 178 | port, NULL, NULL, &ahc_echo, NULL, MHD_OPTION_END); |
180 | if (d == NULL) | 179 | if (d == NULL) |
181 | return 1; | 180 | return 1; |
182 | if (0 == port) | 181 | if (0 == port) |
@@ -248,7 +247,7 @@ testMultithreadedGet () | |||
248 | cbc.pos = 0; | 247 | cbc.pos = 0; |
249 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | 248 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION |
250 | | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG, | 249 | | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG, |
251 | port, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END); | 250 | port, NULL, NULL, &ahc_echo, NULL, MHD_OPTION_END); |
252 | if (d == NULL) | 251 | if (d == NULL) |
253 | return 16; | 252 | return 16; |
254 | if (0 == port) | 253 | if (0 == port) |
@@ -319,7 +318,7 @@ testMultithreadedPoolGet () | |||
319 | cbc.size = 2048; | 318 | cbc.size = 2048; |
320 | cbc.pos = 0; | 319 | cbc.pos = 0; |
321 | d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG, | 320 | d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG, |
322 | port, NULL, NULL, &ahc_echo, "GET", | 321 | port, NULL, NULL, &ahc_echo, NULL, |
323 | MHD_OPTION_THREAD_POOL_SIZE, MHD_CPU_COUNT, | 322 | MHD_OPTION_THREAD_POOL_SIZE, MHD_CPU_COUNT, |
324 | MHD_OPTION_END); | 323 | MHD_OPTION_END); |
325 | if (d == NULL) | 324 | if (d == NULL) |
@@ -407,7 +406,7 @@ testExternalGet () | |||
407 | cbc.size = 2048; | 406 | cbc.size = 2048; |
408 | cbc.pos = 0; | 407 | cbc.pos = 0; |
409 | d = MHD_start_daemon (MHD_USE_ERROR_LOG, | 408 | d = MHD_start_daemon (MHD_USE_ERROR_LOG, |
410 | port, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END); | 409 | port, NULL, NULL, &ahc_echo, NULL, MHD_OPTION_END); |
411 | if (d == NULL) | 410 | if (d == NULL) |
412 | return 256; | 411 | return 256; |
413 | if (0 == port) | 412 | if (0 == port) |