Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

curlopt_headeropt(3) [mojave man page]

CURLOPT_HEADEROPT(3)					     curl_easy_setopt options					      CURLOPT_HEADEROPT(3)

NAME
CURLOPT_HEADEROPT - set how to send HTTP headers SYNOPSIS
#include <curl/curl.h> CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HEADEROPT, long bitmask); DESCRIPTION
Pass a long that is a bitmask of options of how to deal with headers. The two mutually exclusive options are: CURLHEADER_UNIFIED - the headers specified in CURLOPT_HTTPHEADER(3) will be used in requests both to servers and proxies. With this option enabled, CURLOPT_PROXYHEADER(3) will not have any effect. CURLHEADER_SEPARATE - makes CURLOPT_HTTPHEADER(3) headers only get sent to a server and not to a proxy. Proxy headers must be set with CUR- LOPT_PROXYHEADER(3) to get used. Note that if a non-CONNECT request is sent to a proxy, libcurl will send both server headers and proxy headers. When doing CONNECT, libcurl will send CURLOPT_PROXYHEADER(3) headers only to the proxy and then CURLOPT_HTTPHEADER(3) headers only to the server. DEFAULT
CURLHEADER_SEPARATE (changed in 7.42.1, ased CURLHEADER_UNIFIED before then) PROTOCOLS
HTTP EXAMPLE
TODO AVAILABILITY
Added in 7.37.0 RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. SEE ALSO
CURLOPT_HTTPHEADER(3), CURLOPT_PROXYHEADER(3), libcurl 7.54.0 February 03, 2016 CURLOPT_HEADEROPT(3)

Check Out this Related Man Page

CURLOPT_HTTPPROXYTUNNEL(3)				     curl_easy_setopt options					CURLOPT_HTTPPROXYTUNNEL(3)

NAME
CURLOPT_HTTPPROXYTUNNEL - tunnel through HTTP proxy SYNOPSIS
#include <curl/curl.h> CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HTTPPROXYTUNNEL, long tunnel); DESCRIPTION
Set the parameter to 1 to make libcurl tunnel all operations through the HTTP proxy. There is a big difference between using a proxy and to tunnel through it. If you don't know what this means, you probably don't want this tunneling option. Tunneling essentially means that a CONNECT is sent to the proxy, asking it to connect to a remote host on a specific port number and then the traffic is just passed through the proxy. Proxies tend to whitelist specific port numbers it allows CONNECT requests to and often only port 80 and 443 are allowed. When using this, it only makes sense to use CURLOPT_PROXYTYPE(3) set to a HTTP proxy. To suppress proxy CONNECT response headers from user callbacks use CURLOPT_SUPPRESS_CONNECT_HEADERS(3). DEFAULT
0 PROTOCOLS
All network protocols EXAMPLE
TODO AVAILABILITY
Always RETURN VALUE
Returns CURLE_OK SEE ALSO
CURLOPT_PROXY(3), CURLOPT_PROXYTYPE(3), CURLOPT_PROXYPORT(3), libcurl 7.54.0 April 28, 2016 CURLOPT_HTTPPROXYTUNNEL(3)
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

unix server behind MS proxy server

I'm trying to get a Unix server on the internet (mostly for DNS requests) but this server is on a network behind a Proxy server. How can I configure my unix server that he will pass the proxy server for internet requests? (2 Replies)
Discussion started by: RSlegers
2 Replies

2. Programming

Question on order of headers and WEXITSTATUS

In one of the Unix Programming FAQ's they have the following headers in the program to catch SIGCHLD #include <sys/types.h> /* include this before any other sys headers */ #include <sys/wait.h> /* header for waitpid() and various macros */ #include <signal.h> /* header for signal... (5 Replies)
Discussion started by: frequency8
5 Replies

3. Programming

getoptlong

Hi..., I am using the getoptlong() function to handle the options. For some options I am having the long option and for some other I don't want the long option. So, what I have to specify in the place of long option field when declaring the longopt array. (1 Reply)
Discussion started by: nagalenoj
1 Replies

4. Shell Programming and Scripting

Remove text between headers while leaving headers intact

Hi, I'm trying to strip all lines between two headers in a file: ### BEGIN ### Text to remove, contains all kinds of characters ... Antispyware-Downloadserver.com (Germany)=http://www.antispyware-downloadserver.c om/updates/ Antispyware-Downloadserver.com #2... (3 Replies)
Discussion started by: Trones
3 Replies

5. UNIX for Dummies Questions & Answers

How do you specify proxy server in dos/UNIX scripts?

I wrote scipts that automated file downloads from sFTP server. Not long ago a proxy server was introduce into the network, and my script failed. How do you specify proxy server in dos/UNIX scripts? :confused: Hirsi (2 Replies)
Discussion started by: hdirir
2 Replies

6. Shell Programming and Scripting

Proxy with curl/wget support

I need a proxy that would enable me to use cli curl/wget with another ip address. How do I find a paid proxy server that supports curl/wget? (1 Reply)
Discussion started by: locoroco
1 Replies

7. Shell Programming and Scripting

proxy server with wget or cli curl

I'm using a proxy service with an ip address and a port number. How do I use the proxy with wget or cli curl? (1 Reply)
Discussion started by: locoroco
1 Replies

8. Shell Programming and Scripting

Moving String in a File on the top

Hello, I have a file containing data and the headers of the data and the headers of the data randomly anywhere in the file but always with the specific string col1;col2;col3 112233;1133244;112344 112233;1133244;112344 112233;1133244;112344 112233;1133244;112344 Col1;Col2;Col3... (4 Replies)
Discussion started by: pparthiv
4 Replies

9. Shell Programming and Scripting

SIMPLE HTTP PROXY SERVER CHECKER (Completed)

Simple Http Proxy Server Checker Script with curl mirror proxies-scripts/proxc at master * Anoncheg1/proxies-scripts * GitHub output in terminal HTTP, HTTP Connect (HTTPS not supported) command line: proxc filename where filename is file like 119.110.69.185:8080 119.235.16.41:8080... (4 Replies)
Discussion started by: 654321
4 Replies

10. Shell Programming and Scripting

Remove headers thar dont match

Good evening I need your help please, im new at Unix and i wanted to remove the first 5 headers for 100000 records files and then create a control file .ctl that contains the number of records and all seem to work out but when i tested at production it didnt wotk. Here is the code: #!... (6 Replies)
Discussion started by: alexcol
6 Replies

11. Shell Programming and Scripting

Merging File with headers

Hi I need to merge 4 files. The issue i am facing is all the files have headers and i do not want them in the final output file. Can anybody suggest how to do it? (5 Replies)
Discussion started by: Arun Mishra
5 Replies

12. Shell Programming and Scripting

Remove white space and duplicate headers

I have a file called "dsout" with empty rows and duplicate headers. DATE TIME TOTAL_GB USED_GB %USED --------- -------- ---------- ---------- ---------- 03/05/013 12:34 PM 3151.24316 2331.56653 73.988785 ... (3 Replies)
Discussion started by: Daniel Gate
3 Replies

13. UNIX for Dummies Questions & Answers

In place matrix operations

Hello, I`m looking to add headers for in place multiplication of two matrices with headers, my multiplication code is working, please help modify it to add the original headers, also is there a simple way to round the resultant values to the nearest integer? So 9.99 should be 10, 3.005 should... (1 Reply)
Discussion started by: senhia83
1 Replies

14. UNIX and Linux Applications

One DMZ server reverse proxy for 2 websites

Hi All, Hope this is the correct thread to ask this, if not, can an admin please move it to the correct thread. Got a wee problem I hope someone can point me in the right direction. I have Network A with two servers hosting separate webpages (I will call these WP1 & WP2). A DMZ server... (6 Replies)
Discussion started by: dakelly
6 Replies

15. AIX

Curl, to send text message

hello friends I need to send a text message MSM by AIX with a function called CURL you have some example of how it is done so that you can help me please (4 Replies)
Discussion started by: tricampeon81
4 Replies