@@ -205,7 +205,7 @@ - (IBAction)Get:(id)sender
205205 curl_easy_setopt (_curl, CURLOPT_USERAGENT , curl_version ()); // set a default user agent
206206 curl_easy_setopt (_curl, CURLOPT_VERBOSE , 1L ); // turn on verbose
207207 curl_easy_setopt (_curl, CURLOPT_TIMEOUT , 60L ); // seconds
208- curl_easy_setopt (_curl, CURLOPT_MAXCONNECTS , 0L ); // this should disallow connection sharing
208+ // curl_easy_setopt(_curl, CURLOPT_MAXCONNECTS, 0L); // REMOVED - 0 is invalid in curl 8.x
209209 curl_easy_setopt (_curl, CURLOPT_FORBID_REUSE , 1L ); // enforce connection to be closed
210210 curl_easy_setopt (_curl, CURLOPT_DNS_CACHE_TIMEOUT , 0L ); // Disable DNS cache
211211 curl_easy_setopt (_curl, CURLOPT_HTTP_VERSION , CURL_HTTP_VERSION_2_0 ); // enable HTTP2 Protocol
@@ -227,8 +227,8 @@ - (IBAction)Get:(id)sender
227227 // PERFORM the Curl
228228 theResult = curl_easy_perform (_curl);
229229 if (theResult == CURLE_OK ) {
230- long http_code, http_ver;
231- double total_time, total_size, total_speed, timing_ns, timing_tcp, timing_ssl, timing_fb;
230+ long http_code, http_ver, total_size, total_speed ;
231+ double total_time, timing_ns, timing_tcp, timing_ssl, timing_fb;
232232 char *redirect_url2 = NULL ;
233233 curl_easy_getinfo (_curl, CURLINFO_RESPONSE_CODE , &http_code);
234234 curl_easy_getinfo (_curl, CURLINFO_TOTAL_TIME , &total_time);
@@ -256,7 +256,7 @@ - (IBAction)Get:(id)sender
256256 }
257257
258258 // timings
259- _resultText.text = [_resultText.text stringByAppendingFormat: @" \n ** Timing Details **\n -- \t Name Lookup:\t %0.2f s\n -- \t TCP Connect: \t %0.2f s\n -- \t SSL Handshake: \t %0.2f s\n -- \t First Byte: \t\t %0.2f s\n -- \t Total Download: \t %0.2f s\n -- Size: %0.0f bytes\n -- Speed: %0.0f bytes/sec\n -- Using: %@ \n ** RESULT CODE: %ld **" ,
259+ _resultText.text = [_resultText.text stringByAppendingFormat: @" \n ** Timing Details **\n -- \t Name Lookup:\t %0.2f s\n -- \t TCP Connect: \t %0.2f s\n -- \t SSL Handshake: \t %0.2f s\n -- \t First Byte: \t\t %0.2f s\n -- \t Total Download: \t %0.2f s\n -- Size: %" CURL_FORMAT_CURL_OFF_T " bytes\n -- Speed: %" CURL_FORMAT_CURL_OFF_T " bytes/sec\n -- Using: %@\n ** RESULT CODE: %ld **" ,
260260 timing_ns,timing_tcp,timing_ssl,timing_fb,
261261 total_time,total_size, total_speed, http_ver_s, http_code];
262262
0 commit comments