diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2019-05-03 18:11:28 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2019-05-03 18:11:28 +0300 |
commit | 203d885e1ef7d6349e7f8c8df0c47b0181d8c137 (patch) | |
tree | 7d0d952ea66d73e7b1073c4e9aeabdb1d595a084 | |
parent | 9631f33bdf935e9ef572977a7d5387a732453972 (diff) | |
download | libmicrohttpd-203d885e1ef7d6349e7f8c8df0c47b0181d8c137.tar.gz libmicrohttpd-203d885e1ef7d6349e7f8c8df0c47b0181d8c137.zip |
test_postprocessor*: fixed to use updated struct MHD_HTTP_Header
-rw-r--r-- | src/microhttpd/test_postprocessor.c | 12 | ||||
-rw-r--r-- | src/microhttpd/test_postprocessor_amp.c | 2 | ||||
-rw-r--r-- | src/microhttpd/test_postprocessor_large.c | 2 |
3 files changed, 16 insertions, 0 deletions
diff --git a/src/microhttpd/test_postprocessor.c b/src/microhttpd/test_postprocessor.c index 36b32f6d..acbb5b02 100644 --- a/src/microhttpd/test_postprocessor.c +++ b/src/microhttpd/test_postprocessor.c | |||
@@ -137,6 +137,8 @@ test_urlencoding (void) | |||
137 | connection.headers_received = &header; | 137 | connection.headers_received = &header; |
138 | header.header = MHD_HTTP_HEADER_CONTENT_TYPE; | 138 | header.header = MHD_HTTP_HEADER_CONTENT_TYPE; |
139 | header.value = MHD_HTTP_POST_ENCODING_FORM_URLENCODED; | 139 | header.value = MHD_HTTP_POST_ENCODING_FORM_URLENCODED; |
140 | header.header_size = MHD_STATICSTR_LEN_(MHD_HTTP_HEADER_CONTENT_TYPE); | ||
141 | header.value_size = MHD_STATICSTR_LEN_(MHD_HTTP_POST_ENCODING_FORM_URLENCODED); | ||
140 | header.kind = MHD_HEADER_KIND; | 142 | header.kind = MHD_HEADER_KIND; |
141 | pp = MHD_create_post_processor (&connection, | 143 | pp = MHD_create_post_processor (&connection, |
142 | 1024, &value_checker, &want_off); | 144 | 1024, &value_checker, &want_off); |
@@ -181,6 +183,8 @@ test_multipart_garbage (void) | |||
181 | header.header = MHD_HTTP_HEADER_CONTENT_TYPE; | 183 | header.header = MHD_HTTP_HEADER_CONTENT_TYPE; |
182 | header.value = | 184 | header.value = |
183 | MHD_HTTP_POST_ENCODING_MULTIPART_FORMDATA ", boundary=AaB03x"; | 185 | MHD_HTTP_POST_ENCODING_MULTIPART_FORMDATA ", boundary=AaB03x"; |
186 | header.header_size = MHD_STATICSTR_LEN_(MHD_HTTP_HEADER_CONTENT_TYPE); | ||
187 | header.value_size = MHD_STATICSTR_LEN_(MHD_HTTP_POST_ENCODING_MULTIPART_FORMDATA ", boundary=AaB03x"); | ||
184 | header.kind = MHD_HEADER_KIND; | 188 | header.kind = MHD_HEADER_KIND; |
185 | pp = MHD_create_post_processor (&connection, | 189 | pp = MHD_create_post_processor (&connection, |
186 | 1024, &value_checker, &want_off); | 190 | 1024, &value_checker, &want_off); |
@@ -214,6 +218,8 @@ test_multipart_splits (void) | |||
214 | header.header = MHD_HTTP_HEADER_CONTENT_TYPE; | 218 | header.header = MHD_HTTP_HEADER_CONTENT_TYPE; |
215 | header.value = | 219 | header.value = |
216 | MHD_HTTP_POST_ENCODING_MULTIPART_FORMDATA ", boundary=AaB03x"; | 220 | MHD_HTTP_POST_ENCODING_MULTIPART_FORMDATA ", boundary=AaB03x"; |
221 | header.header_size = strlen (header.header); | ||
222 | header.value_size = strlen (header.value); | ||
217 | header.kind = MHD_HEADER_KIND; | 223 | header.kind = MHD_HEADER_KIND; |
218 | pp = MHD_create_post_processor (&connection, | 224 | pp = MHD_create_post_processor (&connection, |
219 | 1024, &value_checker, &want_off); | 225 | 1024, &value_checker, &want_off); |
@@ -245,6 +251,8 @@ test_multipart (void) | |||
245 | header.value = | 251 | header.value = |
246 | MHD_HTTP_POST_ENCODING_MULTIPART_FORMDATA ", boundary=AaB03x"; | 252 | MHD_HTTP_POST_ENCODING_MULTIPART_FORMDATA ", boundary=AaB03x"; |
247 | header.kind = MHD_HEADER_KIND; | 253 | header.kind = MHD_HEADER_KIND; |
254 | header.header_size = strlen (header.header); | ||
255 | header.value_size = strlen (header.value); | ||
248 | pp = MHD_create_post_processor (&connection, | 256 | pp = MHD_create_post_processor (&connection, |
249 | 1024, &value_checker, &want_off); | 257 | 1024, &value_checker, &want_off); |
250 | i = 0; | 258 | i = 0; |
@@ -280,6 +288,8 @@ test_nested_multipart (void) | |||
280 | header.value = | 288 | header.value = |
281 | MHD_HTTP_POST_ENCODING_MULTIPART_FORMDATA ", boundary=AaB03x"; | 289 | MHD_HTTP_POST_ENCODING_MULTIPART_FORMDATA ", boundary=AaB03x"; |
282 | header.kind = MHD_HEADER_KIND; | 290 | header.kind = MHD_HEADER_KIND; |
291 | header.header_size = strlen (header.header); | ||
292 | header.value_size = strlen (header.value); | ||
283 | pp = MHD_create_post_processor (&connection, | 293 | pp = MHD_create_post_processor (&connection, |
284 | 1024, &value_checker, &want_off); | 294 | 1024, &value_checker, &want_off); |
285 | i = 0; | 295 | i = 0; |
@@ -313,6 +323,8 @@ test_empty_value (void) | |||
313 | connection.headers_received = &header; | 323 | connection.headers_received = &header; |
314 | header.header = MHD_HTTP_HEADER_CONTENT_TYPE; | 324 | header.header = MHD_HTTP_HEADER_CONTENT_TYPE; |
315 | header.value = MHD_HTTP_POST_ENCODING_FORM_URLENCODED; | 325 | header.value = MHD_HTTP_POST_ENCODING_FORM_URLENCODED; |
326 | header.header_size = strlen (header.header); | ||
327 | header.value_size = strlen (header.value); | ||
316 | header.kind = MHD_HEADER_KIND; | 328 | header.kind = MHD_HEADER_KIND; |
317 | pp = MHD_create_post_processor (&connection, | 329 | pp = MHD_create_post_processor (&connection, |
318 | 1024, &value_checker, &want_off); | 330 | 1024, &value_checker, &want_off); |
diff --git a/src/microhttpd/test_postprocessor_amp.c b/src/microhttpd/test_postprocessor_amp.c index fff56b21..6c0ebff4 100644 --- a/src/microhttpd/test_postprocessor_amp.c +++ b/src/microhttpd/test_postprocessor_amp.c | |||
@@ -38,6 +38,8 @@ main (int argc, char *const *argv) | |||
38 | connection.headers_received = &header; | 38 | connection.headers_received = &header; |
39 | header.header = MHD_HTTP_HEADER_CONTENT_TYPE; | 39 | header.header = MHD_HTTP_HEADER_CONTENT_TYPE; |
40 | header.value = MHD_HTTP_POST_ENCODING_FORM_URLENCODED; | 40 | header.value = MHD_HTTP_POST_ENCODING_FORM_URLENCODED; |
41 | header.header_size = strlen (header.header); | ||
42 | header.value_size = strlen (header.value); | ||
41 | header.kind = MHD_HEADER_KIND; | 43 | header.kind = MHD_HEADER_KIND; |
42 | 44 | ||
43 | pp = MHD_create_post_processor (&connection, | 45 | pp = MHD_create_post_processor (&connection, |
diff --git a/src/microhttpd/test_postprocessor_large.c b/src/microhttpd/test_postprocessor_large.c index 13e8c78f..3421f734 100644 --- a/src/microhttpd/test_postprocessor_large.c +++ b/src/microhttpd/test_postprocessor_large.c | |||
@@ -80,6 +80,8 @@ test_simple_large () | |||
80 | connection.headers_received = &header; | 80 | connection.headers_received = &header; |
81 | header.header = MHD_HTTP_HEADER_CONTENT_TYPE; | 81 | header.header = MHD_HTTP_HEADER_CONTENT_TYPE; |
82 | header.value = MHD_HTTP_POST_ENCODING_FORM_URLENCODED; | 82 | header.value = MHD_HTTP_POST_ENCODING_FORM_URLENCODED; |
83 | header.header_size = strlen (header.header); | ||
84 | header.value_size = strlen (header.value); | ||
83 | header.kind = MHD_HEADER_KIND; | 85 | header.kind = MHD_HEADER_KIND; |
84 | pp = MHD_create_post_processor (&connection, 1024, &value_checker, &pos); | 86 | pp = MHD_create_post_processor (&connection, 1024, &value_checker, &pos); |
85 | i = 0; | 87 | i = 0; |