diff options
author | ng0 <ng0@n0.is> | 2019-08-15 09:52:39 +0000 |
---|---|---|
committer | ng0 <ng0@n0.is> | 2019-08-15 09:52:39 +0000 |
commit | 36fb08f81b748620e97d7d8e2d4255b77e78c545 (patch) | |
tree | 19aa5019c9e9cbf53d74e272fddc8cbc48b39e51 /docs/libcurl/opts/GNURLOPT_HEADEROPT.3 | |
parent | 765f80c1e27acb585eebef46a97ffc769e452879 (diff) | |
parent | aa73eb47bc8583070734696b25b34ad54c2c1f5e (diff) | |
download | gnurl-36fb08f81b748620e97d7d8e2d4255b77e78c545.tar.gz gnurl-36fb08f81b748620e97d7d8e2d4255b77e78c545.tar.bz2 gnurl-36fb08f81b748620e97d7d8e2d4255b77e78c545.zip |
Merge tag 'curl-7_65_3'
7.65.3
Diffstat (limited to 'docs/libcurl/opts/GNURLOPT_HEADEROPT.3')
-rw-r--r-- | docs/libcurl/opts/GNURLOPT_HEADEROPT.3 | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/docs/libcurl/opts/GNURLOPT_HEADEROPT.3 b/docs/libcurl/opts/GNURLOPT_HEADEROPT.3 index 643f92ed5..eaea05dff 100644 --- a/docs/libcurl/opts/GNURLOPT_HEADEROPT.3 +++ b/docs/libcurl/opts/GNURLOPT_HEADEROPT.3 @@ -57,12 +57,14 @@ if(curl) { list = curl_slist_append(list, "Accept:"); curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); curl_easy_setopt(curl, CURLOPT_PROXY, "http://localhost:8080"); + curl_easy_setopt(curl, CURLOPT_HTTPHEADER, list); /* HTTPS over a proxy makes a separate CONNECT to the proxy, so tell libcurl to not send the custom headers to the proxy. Keep them separate! */ curl_easy_setopt(curl, CURLOPT_HEADEROPT, CURLHEADER_SEPARATE); ret = curl_easy_perform(curl); + curl_slist_free_all(list); curl_easy_cleanup(curl); } .fi |