libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit d1d4e15a97932b0122eb0c4a6d54453269c85792
parent 424abcd21daf7000fa826a03de6188ea608a50ec
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Tue, 31 Oct 2017 15:20:39 +0300

Stick to C89 standard for a while

Diffstat:
Msrc/examples/chunked_example.c | 8++++----
Msrc/examples/https_fileserver_example.c | 2+-
Msrc/microhttpd/response.c | 11++++++++---
Msrc/microhttpd/test_str.c | 4++--
Msrc/microhttpd/test_upgrade.c | 6++++--
Msrc/testcurl/gauger.h | 2+-
Msrc/testcurl/https/test_https_session_info.c | 6+++---
Msrc/testcurl/test_delete.c | 24++++++++++++------------
Msrc/testcurl/test_get_chunked.c | 24++++++++++++------------
Msrc/testcurl/test_get_response_cleanup.c | 4++--
Msrc/testcurl/test_iplimit.c | 12++++++------
Msrc/testcurl/test_large_put.c | 24++++++++++++------------
Msrc/testcurl/test_post.c | 30+++++++++++++++---------------
Msrc/testcurl/test_post_loop.c | 24++++++++++++------------
Msrc/testcurl/test_postform.c | 24++++++++++++------------
Msrc/testcurl/test_put.c | 24++++++++++++------------
Msrc/testcurl/test_put_chunked.c | 32++++++++++++++++----------------
Msrc/testcurl/test_termination.c | 2+-
Msrc/testcurl/test_timeout.c | 12++++++------
Msrc/testzzuf/test_get.c | 18+++++++++---------
Msrc/testzzuf/test_get_chunked.c | 18+++++++++---------
Msrc/testzzuf/test_long_header.c | 12++++++------
Msrc/testzzuf/test_post.c | 18+++++++++---------
Msrc/testzzuf/test_post_form.c | 18+++++++++---------
Msrc/testzzuf/test_put.c | 18+++++++++---------
Msrc/testzzuf/test_put_chunked.c | 24++++++++++++------------
Msrc/testzzuf/test_put_large.c | 18+++++++++---------
27 files changed, 213 insertions(+), 206 deletions(-)

diff --git a/src/examples/chunked_example.c b/src/examples/chunked_example.c @@ -162,11 +162,11 @@ main (int argc, char *const *argv) "Port must be a number between 1 and 65535\n"); return 1; } - d = MHD_start_daemon (// MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG, + d = MHD_start_daemon (/* MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG, */ MHD_USE_AUTO | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG, - // MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG | MHD_USE_POLL, - // MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG | MHD_USE_POLL, - // MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG, + /* MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG | MHD_USE_POLL, */ + /* MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG | MHD_USE_POLL, */ + /* MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG, */ (uint16_t) port, NULL, NULL, &ahc_echo, NULL, diff --git a/src/examples/https_fileserver_example.c b/src/examples/https_fileserver_example.c @@ -43,7 +43,7 @@ #define BUF_SIZE 1024 #define MAX_URL_LEN 255 -// TODO remove if unused +/* TODO remove if unused */ #define CAFILE "ca.pem" #define CRLFILE "crl.pem" diff --git a/src/microhttpd/response.c b/src/microhttpd/response.c @@ -208,8 +208,9 @@ MHD_get_response_headers (struct MHD_Response *response, void *iterator_cls) { int numHeaders = 0; + struct MHD_HTTP_Header *pos; - for (struct MHD_HTTP_Header *pos = response->first_header; + for (pos = response->first_header; NULL != pos; pos = pos->next) { @@ -237,9 +238,11 @@ const char * MHD_get_response_header (struct MHD_Response *response, const char *key) { + struct MHD_HTTP_Header *pos; + if (NULL == key) return NULL; - for (struct MHD_HTTP_Header *pos = response->first_header; + for (pos = response->first_header; NULL != pos; pos = pos->next) { @@ -269,13 +272,15 @@ MHD_check_response_header_token_ci (const struct MHD_Response *response, const char *token, size_t token_len) { + struct MHD_HTTP_Header *pos; + if ( (NULL == key) || ('\0' == key[0]) || (NULL == token) || ('\0' == token[0]) ) return false; - for (struct MHD_HTTP_Header *pos = response->first_header; + for (pos = response->first_header; NULL != pos; pos = pos->next) { diff --git a/src/microhttpd/test_str.c b/src/microhttpd/test_str.c @@ -1951,7 +1951,7 @@ int check_strx_to_uint32_n_no_val(void) { size_t rs; const struct str_with_len * const t = str_no_num + i; - static const uint32_t rnd_val = 3214314212L; + static const uint32_t rnd_val = 3214314212UL; size_t len; for (len = 0; len <= t->len + 1; len++) @@ -2397,7 +2397,7 @@ int check_strx_to_uint64_n_no_val(void) { size_t rs; const struct str_with_len * const t = str_no_num + i; - static const uint64_t rnd_val = 3214314212L; + static const uint64_t rnd_val = 3214314212UL; size_t len; for (len = 0; len <= t->len + 1; len++) diff --git a/src/microhttpd/test_upgrade.c b/src/microhttpd/test_upgrade.c @@ -566,9 +566,10 @@ send_all (wr_socket sock, { size_t len = strlen (text); ssize_t ret; + size_t off; make_blocking (wr_fd (sock)); - for (size_t off = 0; off < len; off += ret) + for (off = 0; off < len; off += ret) { ret = wr_send (sock, &text[off], @@ -642,9 +643,10 @@ recv_all (wr_socket sock, size_t len = strlen (text); char buf[len]; ssize_t ret; + size_t off; make_blocking (wr_fd (sock)); - for (size_t off = 0; off < len; off += ret) + for (off = 0; off < len; off += ret) { ret = wr_recv (sock, &buf[off], diff --git a/src/testcurl/gauger.h b/src/testcurl/gauger.h @@ -81,6 +81,6 @@ #define GAUGER_ID(category, counter, value, unit, id) {} #define GAUGER(category, counter, value, unit) {} -#endif // WINDOWS +#endif /* WINDOWS */ #endif diff --git a/src/testcurl/https/test_https_session_info.c b/src/testcurl/https/test_https_session_info.c @@ -163,9 +163,9 @@ test_query_session () curl_easy_setopt (c, CURLOPT_SSL_VERIFYHOST, 0); curl_easy_setopt (c, CURLOPT_FAILONERROR, 1); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); if (CURLE_OK != (errornum = curl_easy_perform (c))) { diff --git a/src/testcurl/test_delete.c b/src/testcurl/test_delete.c @@ -168,9 +168,9 @@ testInternalDelete () else curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT, 150L); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); if (CURLE_OK != (errornum = curl_easy_perform (c))) { @@ -241,9 +241,9 @@ testMultithreadedDelete () else curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT, 150L); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); if (CURLE_OK != (errornum = curl_easy_perform (c))) { @@ -315,9 +315,9 @@ testMultithreadedPoolDelete () else curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT, 150L); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); if (CURLE_OK != (errornum = curl_easy_perform (c))) { @@ -404,9 +404,9 @@ testExternalDelete () else curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT, 150L); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); diff --git a/src/testcurl/test_get_chunked.c b/src/testcurl/test_get_chunked.c @@ -214,9 +214,9 @@ testInternalGet () curl_easy_setopt (c, CURLOPT_TIMEOUT, 150L); curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT, 150L); curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); if (CURLE_OK != (errornum = curl_easy_perform (c))) { @@ -271,9 +271,9 @@ testMultithreadedGet () curl_easy_setopt (c, CURLOPT_TIMEOUT, 150L); curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT, 150L); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); if (CURLE_OK != (errornum = curl_easy_perform (c))) { @@ -329,9 +329,9 @@ testMultithreadedPoolGet () curl_easy_setopt (c, CURLOPT_TIMEOUT, 150L); curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT, 150L); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); if (CURLE_OK != (errornum = curl_easy_perform (c))) { @@ -401,9 +401,9 @@ testExternalGet () curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); curl_easy_setopt (c, CURLOPT_TIMEOUT, 150L); curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT, 5L); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); diff --git a/src/testcurl/test_get_response_cleanup.c b/src/testcurl/test_get_response_cleanup.c @@ -187,7 +187,7 @@ testInternalGet () (void)sleep (1); kill_curl (curl); (void)sleep (1); - // fprintf (stderr, "Stopping daemon!\n"); + /* fprintf (stderr, "Stopping daemon!\n"); */ MHD_stop_daemon (d); if (ok != 0) return 2; @@ -378,7 +378,7 @@ testExternalGet () } MHD_run (d); } - // fprintf (stderr, "Stopping daemon!\n"); + /* fprintf (stderr, "Stopping daemon!\n"); */ MHD_stop_daemon (d); if (ok != 0) return 1024; diff --git a/src/testcurl/test_iplimit.c b/src/testcurl/test_iplimit.c @@ -171,9 +171,9 @@ testMultithreadedGet () curl_easy_setopt (c, CURLOPT_FORBID_REUSE, 0L); curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT, 150L); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); errornum = curl_easy_perform (c); @@ -278,9 +278,9 @@ testMultithreadedPoolGet () curl_easy_setopt (c, CURLOPT_FORBID_REUSE, 0L); curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT, 150L); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); errornum = curl_easy_perform (c); diff --git a/src/testcurl/test_large_put.c b/src/testcurl/test_large_put.c @@ -230,9 +230,9 @@ testPutInternalThread (unsigned int add_flag) else curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT, 150L); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); if (CURLE_OK != (errornum = curl_easy_perform (c))) { @@ -310,9 +310,9 @@ testPutThreadPerConn (unsigned int add_flag) else curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT, 150L); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); if (CURLE_OK != (errornum = curl_easy_perform (c))) { @@ -393,9 +393,9 @@ testPutThreadPool (unsigned int add_flag) else curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT, 150L); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); if (CURLE_OK != (errornum = curl_easy_perform (c))) { @@ -490,9 +490,9 @@ testPutExternal (void) else curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT, 150L); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); diff --git a/src/testcurl/test_post.c b/src/testcurl/test_post.c @@ -213,9 +213,9 @@ testInternalPost () else curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT, 150L); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); if (CURLE_OK != (errornum = curl_easy_perform (c))) { @@ -286,9 +286,9 @@ testMultithreadedPost () else curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT, 150L); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); if (CURLE_OK != (errornum = curl_easy_perform (c))) { @@ -360,9 +360,9 @@ testMultithreadedPoolPost () else curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT, 150L); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); if (CURLE_OK != (errornum = curl_easy_perform (c))) { @@ -448,9 +448,9 @@ testExternalPost () else curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT, 150L); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); @@ -692,9 +692,9 @@ testMultithreadedPostCancelPart(int flags) else curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT, 150L); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); if (flags & FLAG_CHUNKED) diff --git a/src/testcurl/test_post_loop.c b/src/testcurl/test_post_loop.c @@ -164,9 +164,9 @@ testInternalPost () else curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT, 150L); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); if (CURLE_OK != (errornum = curl_easy_perform (c))) { @@ -246,9 +246,9 @@ testMultithreadedPost () else curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT, 150L); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); if (CURLE_OK != (errornum = curl_easy_perform (c))) { @@ -329,9 +329,9 @@ testMultithreadedPoolPost () else curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT, 150L); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); if (CURLE_OK != (errornum = curl_easy_perform (c))) { @@ -435,9 +435,9 @@ testExternalPost () else curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT, 150L); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); mret = curl_multi_add_handle (multi, c); if (mret != CURLM_OK) diff --git a/src/testcurl/test_postform.c b/src/testcurl/test_postform.c @@ -227,9 +227,9 @@ testInternalPost () else curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT, 150L); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); if (CURLE_OK != (errornum = curl_easy_perform (c))) { @@ -302,9 +302,9 @@ testMultithreadedPost () else curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT, 5L); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); if (CURLE_OK != (errornum = curl_easy_perform (c))) { @@ -378,9 +378,9 @@ testMultithreadedPoolPost () else curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT, 5L); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); if (CURLE_OK != (errornum = curl_easy_perform (c))) { @@ -468,9 +468,9 @@ testExternalPost () else curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT, 150L); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); diff --git a/src/testcurl/test_put.c b/src/testcurl/test_put.c @@ -171,9 +171,9 @@ testInternalPut () else curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT, 150L); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); if (CURLE_OK != (errornum = curl_easy_perform (c))) { @@ -246,9 +246,9 @@ testMultithreadedPut () else curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT, 150L); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); if (CURLE_OK != (errornum = curl_easy_perform (c))) { @@ -323,9 +323,9 @@ testMultithreadedPoolPut () else curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT, 150L); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); if (CURLE_OK != (errornum = curl_easy_perform (c))) { @@ -415,9 +415,9 @@ curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); else curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT, 150L); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); diff --git a/src/testcurl/test_put_chunked.c b/src/testcurl/test_put_chunked.c @@ -169,17 +169,17 @@ testInternalPut () curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer); curl_easy_setopt (c, CURLOPT_READDATA, &pos); curl_easy_setopt (c, CURLOPT_UPLOAD, 1L); + /* by not giving the file size, we force chunking! */ /* - // by not giving the file size, we force chunking! curl_easy_setopt (c, CURLOPT_INFILESIZE_LARGE, (curl_off_t) 8L); */ curl_easy_setopt (c, CURLOPT_FAILONERROR, 1); curl_easy_setopt (c, CURLOPT_TIMEOUT, 150L); curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT, 150L); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); if (CURLE_OK != (errornum = curl_easy_perform (c))) { @@ -240,17 +240,17 @@ testMultithreadedPut () curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer); curl_easy_setopt (c, CURLOPT_READDATA, &pos); curl_easy_setopt (c, CURLOPT_UPLOAD, 1L); + /* by not giving the file size, we force chunking! */ /* - // by not giving the file size, we force chunking! curl_easy_setopt (c, CURLOPT_INFILESIZE_LARGE, (curl_off_t) 8L); */ curl_easy_setopt (c, CURLOPT_FAILONERROR, 1); curl_easy_setopt (c, CURLOPT_TIMEOUT, 150L); curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT, 150L); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); if (CURLE_OK != (errornum = curl_easy_perform (c))) { @@ -313,17 +313,17 @@ testMultithreadedPoolPut () curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer); curl_easy_setopt (c, CURLOPT_READDATA, &pos); curl_easy_setopt (c, CURLOPT_UPLOAD, 1L); + /* by not giving the file size, we force chunking! */ /* - // by not giving the file size, we force chunking! curl_easy_setopt (c, CURLOPT_INFILESIZE_LARGE, (curl_off_t) 8L); */ curl_easy_setopt (c, CURLOPT_FAILONERROR, 1); curl_easy_setopt (c, CURLOPT_TIMEOUT, 150L); curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT, 150L); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); if (CURLE_OK != (errornum = curl_easy_perform (c))) { @@ -401,17 +401,17 @@ testExternalPut () curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer); curl_easy_setopt (c, CURLOPT_READDATA, &pos); curl_easy_setopt (c, CURLOPT_UPLOAD, 1L); + /* by not giving the file size, we force chunking! */ /* - // by not giving the file size, we force chunking! curl_easy_setopt (c, CURLOPT_INFILESIZE_LARGE, (curl_off_t) 8L); */ curl_easy_setopt (c, CURLOPT_FAILONERROR, 1); curl_easy_setopt (c, CURLOPT_TIMEOUT, 150L); curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT, 150L); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); diff --git a/src/testcurl/test_termination.c b/src/testcurl/test_termination.c @@ -121,7 +121,7 @@ main (void) } CURL *curl = curl_easy_init (); - //curl_easy_setopt(curl, CURLOPT_POST, 1L); + /* curl_easy_setopt(curl, CURLOPT_POST, 1L); */ char url[255]; sprintf (url, "http://127.0.0.1:%d", port); curl_easy_setopt (curl, CURLOPT_URL, url); diff --git a/src/testcurl/test_timeout.c b/src/testcurl/test_timeout.c @@ -217,9 +217,9 @@ testWithoutTimeout () else curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT, 150L); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); if (CURLE_OK != (errornum = curl_easy_perform (c))) { @@ -291,9 +291,9 @@ testWithTimeout () else curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT, 150L); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); if (CURLE_OK != (errornum = curl_easy_perform (c))) { diff --git a/src/testzzuf/test_get.c b/src/testzzuf/test_get.c @@ -124,9 +124,9 @@ testInternalGet () curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); else curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); curl_easy_perform (c); curl_easy_cleanup (c); @@ -168,9 +168,9 @@ testMultithreadedGet () else curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT_MS, CURL_TIMEOUT); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); curl_easy_perform (c); curl_easy_cleanup (c); @@ -229,9 +229,9 @@ testExternalGet () curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); curl_easy_setopt (c, CURLOPT_TIMEOUT_MS, CURL_TIMEOUT); curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT_MS, CURL_TIMEOUT); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); mret = curl_multi_add_handle (multi, c); if (mret != CURLM_OK) diff --git a/src/testzzuf/test_get_chunked.c b/src/testzzuf/test_get_chunked.c @@ -148,9 +148,9 @@ testInternalGet () curl_easy_setopt (c, CURLOPT_TIMEOUT_MS, CURL_TIMEOUT); curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT_MS, CURL_TIMEOUT); curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); curl_easy_perform (c); curl_easy_cleanup (c); @@ -189,9 +189,9 @@ testMultithreadedGet () curl_easy_setopt (c, CURLOPT_TIMEOUT_MS, CURL_TIMEOUT); curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT_MS, CURL_TIMEOUT); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); curl_easy_perform (c); curl_easy_cleanup (c); @@ -247,9 +247,9 @@ testExternalGet () curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); curl_easy_setopt (c, CURLOPT_TIMEOUT_MS, CURL_TIMEOUT); curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT_MS, CURL_TIMEOUT); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); mret = curl_multi_add_handle (multi, c); if (mret != CURLM_OK) diff --git a/src/testzzuf/test_long_header.c b/src/testzzuf/test_long_header.c @@ -139,9 +139,9 @@ testLongUrlGet () curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); else curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); curl_easy_perform (c); curl_easy_cleanup (c); @@ -202,9 +202,9 @@ testLongHeaderGet () curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); else curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); curl_easy_perform (c); curl_slist_free_all (header); diff --git a/src/testzzuf/test_post.c b/src/testzzuf/test_post.c @@ -186,9 +186,9 @@ testInternalPost () else curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT_MS, CURL_TIMEOUT); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); curl_easy_perform (c); curl_easy_cleanup (c); @@ -238,9 +238,9 @@ testMultithreadedPost () else curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT_MS, CURL_TIMEOUT); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); curl_easy_perform (c); curl_easy_cleanup (c); @@ -308,9 +308,9 @@ testExternalPost () else curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT_MS, CURL_TIMEOUT); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); diff --git a/src/testzzuf/test_post_form.c b/src/testzzuf/test_post_form.c @@ -203,9 +203,9 @@ testInternalPost () else curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT_MS, CURL_TIMEOUT); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); curl_easy_perform (c); curl_easy_cleanup (c); @@ -254,9 +254,9 @@ testMultithreadedPost () else curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT_MS, CURL_TIMEOUT); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); curl_easy_perform (c); curl_easy_cleanup (c); @@ -322,9 +322,9 @@ testExternalPost () else curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT, 15L); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); diff --git a/src/testzzuf/test_put.c b/src/testzzuf/test_put.c @@ -153,9 +153,9 @@ testInternalPut () else curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT_MS, CURL_TIMEOUT); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); curl_easy_perform (c); curl_easy_cleanup (c); @@ -204,9 +204,9 @@ testMultithreadedPut () else curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT_MS, CURL_TIMEOUT); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); curl_easy_perform (c); curl_easy_cleanup (c); @@ -273,9 +273,9 @@ testExternalPut () else curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT_MS, CURL_TIMEOUT); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); diff --git a/src/testzzuf/test_put_chunked.c b/src/testzzuf/test_put_chunked.c @@ -151,17 +151,17 @@ testInternalPut () curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer); curl_easy_setopt (c, CURLOPT_READDATA, &pos); curl_easy_setopt (c, CURLOPT_UPLOAD, 1L); + /* by not giving the file size, we force chunking! */ /* - // by not giving the file size, we force chunking! curl_easy_setopt (c, CURLOPT_INFILESIZE_LARGE, (curl_off_t) 8L); */ curl_easy_setopt (c, CURLOPT_FAILONERROR, 1); curl_easy_setopt (c, CURLOPT_TIMEOUT_MS, CURL_TIMEOUT); curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT_MS, CURL_TIMEOUT); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); curl_easy_perform (c); curl_easy_cleanup (c); @@ -198,17 +198,17 @@ testMultithreadedPut () curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer); curl_easy_setopt (c, CURLOPT_READDATA, &pos); curl_easy_setopt (c, CURLOPT_UPLOAD, 1L); + /* by not giving the file size, we force chunking! */ /* - // by not giving the file size, we force chunking! curl_easy_setopt (c, CURLOPT_INFILESIZE_LARGE, (curl_off_t) 8L); */ curl_easy_setopt (c, CURLOPT_FAILONERROR, 1); curl_easy_setopt (c, CURLOPT_TIMEOUT, 150L); curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT, 15L); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); if (CURLE_OK != (errornum = curl_easy_perform (c))) { @@ -277,17 +277,17 @@ testExternalPut () curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer); curl_easy_setopt (c, CURLOPT_READDATA, &pos); curl_easy_setopt (c, CURLOPT_UPLOAD, 1L); + /* by not giving the file size, we force chunking! */ /* - // by not giving the file size, we force chunking! curl_easy_setopt (c, CURLOPT_INFILESIZE_LARGE, (curl_off_t) 8L); */ curl_easy_setopt (c, CURLOPT_FAILONERROR, 1); curl_easy_setopt (c, CURLOPT_TIMEOUT_MS, CURL_TIMEOUT); curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT_MS, CURL_TIMEOUT); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); diff --git a/src/testzzuf/test_put_large.c b/src/testzzuf/test_put_large.c @@ -168,9 +168,9 @@ testInternalPut () else curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT_MS, CURL_TIMEOUT); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); curl_easy_perform (c); curl_easy_cleanup (c); @@ -220,9 +220,9 @@ testMultithreadedPut () else curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT_MS, CURL_TIMEOUT); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); curl_easy_perform (c); curl_easy_cleanup (c); @@ -291,9 +291,9 @@ testExternalPut () else curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT_MS, CURL_TIMEOUT); - // NOTE: use of CONNECTTIMEOUT without also - // setting NOSIGNAL results in really weird - // crashes on my system! + /* NOTE: use of CONNECTTIMEOUT without also + * setting NOSIGNAL results in really weird + * crashes on my system! */ curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1);