10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I m using free zoho mail client application (similar to microsoft outlook) on my mobile for all my emails to mohtashim@techx.com
I wish to only recieve emails from my Linux Server details of which are: techx 3.10.0-514.10.2.el7.x86_64 #1 SMP CentOS release 7.3.1611 (Core).
I try the below... (20 Replies)
Discussion started by: mohtashims
20 Replies
2. UNIX for Dummies Questions & Answers
Hello All,
I was curious if its possible to send an email (in reverse) to a linux server from an email client (like Lotus Notes, Outlook, etc...)?
I know it's possible to send an email FROM a Linux Server TO a email address, but I tried to just 'reply' to the Linux Servers
address that sent... (8 Replies)
Discussion started by: mrm5102
8 Replies
3. Red Hat
While sending mail from linux server we observed below logs,
stat=Deferred: Name server: xxxxxxxxxx.: host name lookup failure
Kindly suggest what we need to change?
Thanks in Advance (2 Replies)
Discussion started by: hydoss1
2 Replies
4. Shell Programming and Scripting
Let's say I have a script which creates a report. I use getopts to have different options available to the user. One of these options is -f which basically exports the output of script to a text file which user may give the name of that text file. How can I output the result to the requested file.... (3 Replies)
Discussion started by: bashily
3 Replies
5. Shell Programming and Scripting
HI All,
I am facing the problem with rmail ...
Actually my server is linux environment Redhot server.
To send a mail which command I have to use it . I want subject and I want to Include CC also
And body of the mail also there . But If I use rmail command it is not taking any options to... (1 Reply)
Discussion started by: ksrivani
1 Replies
6. UNIX for Dummies Questions & Answers
I'm new to Unix and web development but I'm in need to send an xml request to a web server Ican't find an easy way to do it from the command line, if somebody can help me with a sample would be amazing! my Unix says that curl is not installed so i was wondering if there is another way to test... (1 Reply)
Discussion started by: mpoblete
1 Replies
7. UNIX for Advanced & Expert Users
Hi,
I am using curl to hit a url using http in solaris 10 using commandline, I want to transfer an attachment(using multipart curl -F) also as a part of the request. If anyone has used kindly help me with the syntax. I am using below command:
Code:
/usr/local/bin/curl -v... (1 Reply)
Discussion started by: manishmaha
1 Replies
8. UNIX for Dummies Questions & Answers
Hi
The script:
#!/bin/sh
#set -x
# set admin email so that you can get email
ADMIN="myemailaddress"
# set alert level
ALERT=4
df -HP | grep -vE '^Filesystem|tmpfs|cdrom' | awk '{ print $5 " " $1 }' | while read output;
do
#echo $output
usep=$(echo $output | awk '{ print... (5 Replies)
Discussion started by: wbdevilliers
5 Replies
9. Shell Programming and Scripting
How to hit HTTP Post Request along with sending XML data to a Remote server through command line utility like wget (or anything else). (0 Replies)
Discussion started by: sandeep reddy
0 Replies
10. UNIX for Dummies Questions & Answers
Ok. I'm testing a new program component that is supposed to speed up our pipeline on the server. What it does is take in HEAD requests and shuffle them off to a different pipeline that is specially designed to handle HEAD requests quickly. The functionality works but now comes the question: how... (3 Replies)
Discussion started by: darkling235
3 Replies
CURLOPT_ACCEPT_ENCODING(3) curl_easy_setopt options CURLOPT_ACCEPT_ENCODING(3)
NAME
CURLOPT_ACCEPT_ENCODING - enables automatic decompression of HTTP downloads
SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_ACCEPT_ENCODING, char *enc);
DESCRIPTION
Pass a char * argument specifying what encoding you'd like.
Sets the contents of the Accept-Encoding: header sent in a HTTP request, and enables decoding of a response when a Content-Encoding: header
is received. Three encodings are supported: identity, meaning non-compressed, deflate which requests the server to compress its response
using the zlib algorithm, and gzip which requests the gzip algorithm.
If a zero-length string is set like "", then an Accept-Encoding: header containing all built-in supported encodings is sent.
Set this option to NULL to explicitly disable it, which makes libcurl not send an Accept-Encoding: header and not decompress contents auto-
matically.
You can also opt to just include the Accept-Encoding: header in your request with CURLOPT_HTTPHEADER(3) but then there will be no automatic
decompressing when receiving data.
This is a request, not an order; the server may or may not do it. This option must be set (to any non-NULL value) or else any unsolicited
encoding done by the server is ignored.
Servers might respond with Content-Encoding even without getting a Accept-Encoding: in the request. Servers might respond with a different
Content-Encoding than what was asked for in the request.
The Content-Length: servers send for a compressed response is supposed to indicate the length of the compressed content so when auto decod-
ing is enabled it may not match the sum of bytes reported by the write callbacks (although, sending the length of the non-compressed con-
tent is a common server mistake).
The application does not have to keep the string around after setting this option.
DEFAULT
NULL
PROTOCOLS
HTTP
EXAMPLE
CURL *curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
/* enable all supported built-in compressions */
curl_easy_setopt(curl, CURLOPT_ACCEPT_ENCODING, "");
/* Perform the request */
curl_easy_perform(curl);
}
AVAILABILITY
This option was called CURLOPT_ENCODING before 7.21.6
RETURN VALUE
Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or CURLE_OUT_OF_MEMORY if there was insufficient heap space.
SEE ALSO
CURLOPT_TRANSFER_ENCODING(3), CURLOPT_HTTPHEADER(3), CURLOPT_HTTP_CONTENT_DECODING(3),
libcurl 7.54.0 December 21, 2016 CURLOPT_ACCEPT_ENCODING(3)