diff options
Diffstat (limited to 'src/testcurl/test_long_header.c')
-rw-r--r-- | src/testcurl/test_long_header.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/testcurl/test_long_header.c b/src/testcurl/test_long_header.c index feaefed5..c1d07cb3 100644 --- a/src/testcurl/test_long_header.c +++ b/src/testcurl/test_long_header.c | |||
@@ -80,17 +80,16 @@ ahc_echo (void *cls, | |||
80 | const char *upload_data, size_t *upload_data_size, | 80 | const char *upload_data, size_t *upload_data_size, |
81 | void **req_cls) | 81 | void **req_cls) |
82 | { | 82 | { |
83 | const char *me = cls; | ||
84 | struct MHD_Response *response; | 83 | struct MHD_Response *response; |
85 | enum MHD_Result ret; | 84 | enum MHD_Result ret; |
85 | (void) cls; | ||
86 | (void) version; (void) upload_data; /* Unused. Silent compiler warning. */ | 86 | (void) version; (void) upload_data; /* Unused. Silent compiler warning. */ |
87 | (void) upload_data_size; (void) req_cls; /* Unused. Silent compiler warning. */ | 87 | (void) upload_data_size; (void) req_cls; /* Unused. Silent compiler warning. */ |
88 | 88 | ||
89 | if (0 != strcmp (me, method)) | 89 | if (0 != strcmp (MHD_HTTP_METHOD_GET, method)) |
90 | return MHD_NO; /* unexpected method */ | 90 | return MHD_NO; /* unexpected method */ |
91 | response = MHD_create_response_from_buffer (strlen (url), | 91 | response = MHD_create_response_from_buffer_copy (strlen (url), |
92 | (void *) url, | 92 | (const void *) url); |
93 | MHD_RESPMEM_MUST_COPY); | ||
94 | ret = MHD_queue_response (connection, MHD_HTTP_OK, response); | 93 | ret = MHD_queue_response (connection, MHD_HTTP_OK, response); |
95 | MHD_destroy_response (response); | 94 | MHD_destroy_response (response); |
96 | return ret; | 95 | return ret; |
@@ -124,8 +123,7 @@ testLongUrlGet (size_t buff_size) | |||
124 | port, | 123 | port, |
125 | &apc_all, | 124 | &apc_all, |
126 | NULL, | 125 | NULL, |
127 | &ahc_echo, | 126 | &ahc_echo, NULL, |
128 | "GET", | ||
129 | MHD_OPTION_CONNECTION_MEMORY_LIMIT, | 127 | MHD_OPTION_CONNECTION_MEMORY_LIMIT, |
130 | (size_t) buff_size, MHD_OPTION_END); | 128 | (size_t) buff_size, MHD_OPTION_END); |
131 | if (d == NULL) | 129 | if (d == NULL) |
@@ -218,8 +216,7 @@ testLongHeaderGet (size_t buff_size) | |||
218 | port, | 216 | port, |
219 | &apc_all, | 217 | &apc_all, |
220 | NULL, | 218 | NULL, |
221 | &ahc_echo, | 219 | &ahc_echo, NULL, |
222 | "GET", | ||
223 | MHD_OPTION_CONNECTION_MEMORY_LIMIT, | 220 | MHD_OPTION_CONNECTION_MEMORY_LIMIT, |
224 | (size_t) buff_size, MHD_OPTION_END); | 221 | (size_t) buff_size, MHD_OPTION_END); |
225 | if (d == NULL) | 222 | if (d == NULL) |