]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
example/http2-download: set CURLOPT_BUFFERSIZE
authorDaniel Stenberg <daniel@haxx.se>
Fri, 9 Jun 2023 08:07:10 +0000 (10:07 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 9 Jun 2023 14:48:20 +0000 (16:48 +0200)
Primarily because no other example sets it, and remove the disabling of
the certificate check because we should not recommend that.

Closes #11284

docs/examples/http2-download.c

index e263571b8c339746a05ea1128cb33f44b9aa3b31..a2291a8c7f12b58ed3ed328e5d30cab4508d0640 100644 (file)
@@ -170,13 +170,12 @@ static void setup(struct transfer *t, int num)
   curl_easy_setopt(hnd, CURLOPT_DEBUGFUNCTION, my_trace);
   curl_easy_setopt(hnd, CURLOPT_DEBUGDATA, t);
 
+  /* enlarge the receive buffer for potentially higher transfer speeds */
+  curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 100000L);
+
   /* HTTP/2 please */
   curl_easy_setopt(hnd, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2_0);
 
-  /* we use a self-signed test server, skip verification during debugging */
-  curl_easy_setopt(hnd, CURLOPT_SSL_VERIFYPEER, 0L);
-  curl_easy_setopt(hnd, CURLOPT_SSL_VERIFYHOST, 0L);
-
 #if (CURLPIPE_MULTIPLEX > 0)
   /* wait for pipe connection to confirm */
   curl_easy_setopt(hnd, CURLOPT_PIPEWAIT, 1L);