diff options
Diffstat (limited to 'src/testcurl/test_post.c')
-rw-r--r-- | src/testcurl/test_post.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/testcurl/test_post.c b/src/testcurl/test_post.c index e36391fd..d97839c0 100644 --- a/src/testcurl/test_post.c +++ b/src/testcurl/test_post.c | |||
@@ -137,9 +137,9 @@ ahc_echo (void *cls, | |||
137 | enum MHD_Result ret; | 137 | enum MHD_Result ret; |
138 | (void) cls; (void) version; /* Unused. Silent compiler warning. */ | 138 | (void) cls; (void) version; /* Unused. Silent compiler warning. */ |
139 | 139 | ||
140 | if (0 != strcmp ("POST", method)) | 140 | if (0 != strcmp (MHD_HTTP_METHOD_POST, method)) |
141 | { | 141 | { |
142 | printf ("METHOD: %s\n", method); | 142 | fprintf (stderr, "METHOD: %s\n", method); |
143 | return MHD_NO; /* unexpected method */ | 143 | return MHD_NO; /* unexpected method */ |
144 | } | 144 | } |
145 | pp = *req_cls; | 145 | pp = *req_cls; |
@@ -152,9 +152,8 @@ ahc_echo (void *cls, | |||
152 | MHD_post_process (pp, upload_data, *upload_data_size); | 152 | MHD_post_process (pp, upload_data, *upload_data_size); |
153 | if ((eok == 3) && (0 == *upload_data_size)) | 153 | if ((eok == 3) && (0 == *upload_data_size)) |
154 | { | 154 | { |
155 | response = MHD_create_response_from_buffer (strlen (url), | 155 | response = MHD_create_response_from_buffer_copy (strlen (url), |
156 | (void *) url, | 156 | (const void *) url); |
157 | MHD_RESPMEM_MUST_COPY); | ||
158 | ret = MHD_queue_response (connection, MHD_HTTP_OK, response); | 157 | ret = MHD_queue_response (connection, MHD_HTTP_OK, response); |
159 | MHD_destroy_response (response); | 158 | MHD_destroy_response (response); |
160 | MHD_destroy_post_processor (pp); | 159 | MHD_destroy_post_processor (pp); |
@@ -608,7 +607,8 @@ ahc_cancel (void *cls, | |||
608 | 607 | ||
609 | if (*req_cls == NULL) | 608 | if (*req_cls == NULL) |
610 | { | 609 | { |
611 | *req_cls = "wibble"; | 610 | static int marker = 1; |
611 | *req_cls = ▮ | ||
612 | /* We don't want the body. Send a 500. */ | 612 | /* We don't want the body. Send a 500. */ |
613 | response = MHD_create_response_empty (MHD_RF_NONE); | 613 | response = MHD_create_response_empty (MHD_RF_NONE); |
614 | ret = MHD_queue_response (connection, 500, response); | 614 | ret = MHD_queue_response (connection, 500, response); |
@@ -768,8 +768,8 @@ testMultithreadedPostCancelPart (int flags) | |||
768 | #endif /* ! _WIN32 */ | 768 | #endif /* ! _WIN32 */ |
769 | { | 769 | { |
770 | fprintf (stderr, | 770 | fprintf (stderr, |
771 | "flibbet curl_easy_perform didn't fail as expected: `%s' %d\n", | 771 | "flibbet curl_easy_perform didn't fail as expected: `%s' %u\n", |
772 | curl_easy_strerror (errornum), errornum); | 772 | curl_easy_strerror (errornum), (unsigned int) errornum); |
773 | result = 65536; | 773 | result = 65536; |
774 | } | 774 | } |
775 | curl_easy_cleanup (c); | 775 | curl_easy_cleanup (c); |