The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [curl]

cURL is a CLI tool for issuing HTTP GET, POST, & PUT request.

141 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4
votes
1answer
1k views

TOR hidden service not always accessible through cURL. Takes multiple tries

When I try to access a hidden service on TOR using cURL, for some reason I'm not getting access to the site 100% of the time. Many times it returns "curl: (7) Can't complete SOCKS5 connection to 0.0.0....
4
votes
0answers
2k views

cURL does not recognize certificate

At our company they enforce a web proxy which breaks SSL connections and replaces the certificate by its own fake certificate. (To be precise it uses a proxy cert which is signed by the company cert.) ...
3
votes
1answer
105 views

How to get subject of gmail letter with curl?

I use curl in my Lua program to get new mail list. I am trying to send request like this local head_command = "curl --connect-timeout 30 -fsm 30" local server = "imap.gmail.com" local mail ...
3
votes
0answers
7k views

Curling a https url via a proxy results in NSS error 5938

A B2B partner needs to make a callback from a Redhat machine to an API method on our web server (Centos7). We added their IP address to our software firewall but nothing was going through. They ...
3
votes
0answers
502 views

cURL and wget cannot resolve hosts, but apt-get works

I've installed Ubuntu server 16.04 in a VirtualBox. If I try to install software with apt-get it works fine, but curl test.de or wget get.typo3.org/8.4.0 shows me that the host could not be resolved. ...
3
votes
0answers
507 views

round robin for curl and dnsmasq

I have setup dnsmasq to the basic configuration, pointing a file with two IP addresses. 10.0.0.1 a.b.c 10.0.0.2 a.b.c When I do nslookup or dig on a.b.c, I see round robin seems to be in effect (as ...
3
votes
0answers
1k views

Difference between “curl -XPUT --data-binary @${file_path}” and “curl -XPUT -T ${file_path}”?

While using curl to POST or PUT a file to a url, there are two different ways to load the file content: -T ${file_path} --data-binary @${file_path} or -d $@{file_path} (for ascii data files) What ...
2
votes
0answers
176 views

PHP Curl when accessing SSL slows down connection. How to correct?

After migrating to a new server, our scripts slowed down dramatically. Some troubleshooting showed that the slowdown occurred during Curl connections as the server was trying to load the SSL cert. ...
2
votes
0answers
132 views

libcurl post request from debian 7 to debian 9 gnutls handshake error

I have a problem with libcurl returning an SSL error, let me describe the situation: There are two machines with Debian, the client is Debian 7 and the server is Debian 9, the client uses libcurl to ...
2
votes
1answer
43 views

Generating quoted command arguments

I'm working with a HTTP API that demands a very particular set of signed headers + JSON body. And I really want to cURL it for debugging and sanity in general. So, I've written a small script that, ...
2
votes
0answers
4k views

gnutls_handshake() failed - why?

I am running the following command: curl --tlsv1.2 -v --cacert ./mycert.crt --key ./key.pem --cert ./mycert.crt https://thirdparty.url I received the certificate from the third party I am working ...
2
votes
2answers
14k views

Specify file name with curl --upload-file

When uploading a file with curl's --upload-file option, how do I specify a file name different than the one on disk? With the -F option, it can be done like this, I think: curl -F 'file=@/path/to/file/...
2
votes
1answer
1k views

Curl NSS / SSL error after update

I use a custom internal authentication server. With the last round of updates it started having issues, apparently due to a change in the ciphers. This is on a CentOS6 box, fully updated. curl https:...
2
votes
1answer
3k views

How to Resolve undefined reference to 'RAND_egd'

Debian 8 Jessie, OpenSSL version 1.1.0, cURL version: 7.50.2 I am trying to build curl on a Linux Debian system. All stages go well up until trying to build with make command. The linking stage fails ...
2
votes
1answer
4k views

SSL Certificate Problem: unable to get local issuer certificate

I am having small initramfs with static busybox into it. The sole purpose of this initramfs is to download/upload files to the HTTPS server. I have the proper certificate and credentials to do so. ...
2
votes
0answers
3k views

How to avoid curl trying IPv6 name resolution

From a docker container when I try to curl 'another container name', curl first tries to resolve the name to IPv6. This causes few seconds delay because the web server is not reachable over ipv6. I ...
2
votes
1answer
678 views

Centos 7 - Can't download RPM (Trying to connect with IPV6)

I am normally an Debian/Ubuntu guy, but I wanted to test the foreman on CentOS 7, but I am having some trouble with the rpm command. I have tried to disable IPV6 with echo 1 > /proc/sys/net/ipv6/...
2
votes
1answer
304 views

Can you fetch git commit data using cURL?

I need to fetch the object of an annotated tag (i.e. the annotation message) from a remote repository and so far there doesn't seem to be a command for that (i.e. ls-remote provides only the refs but ...
2
votes
0answers
311 views

Can I control number of TCP Connections per second in curl?

I am trying to make one traffic generator tool in linux centOS 6.5. I am using curl for this purpose. I can generate traffic from virtual interfaces using curl but I don't know if I can control number ...
2
votes
0answers
11k views

Linux curl request for SOAP webservice call

I have a SOAP webservice WSDL and when I make a call with SOAP-UI tool, it works perfectly fine.... Now, Im trying to mimic the same call using LINUX CURL but get a 404 error, Here is my CURL ...
2
votes
0answers
1k views

Problems uploading a file via WebDAV?

I've configured on my Linux server (SLES11) with IHS Webserver with WebDAV enabled. A file upload via curl is successful using a URL like this: $ curl --insecure --upload-file testfile.txt \ ...
2
votes
0answers
652 views

Nagios not running notify command

I am in the process of creating a notify command for our Nagios server to notify us via our Kannel SMS sender. This is what I got so far: /usr/local/bin/curl -v -G -d 'username=user' -d 'password=...
2
votes
1answer
39k views

Why am I getting “Curl (6) Could not resolve host” after I did a “yum -y update”?

I have a CentOS 7.3 machine that is a guest running on Oracle VirtualBox. The host is a Windows machine. I can ping 8.8.8.8 from the Linux server. The Linux server can ping itself by its hostname ...
1
vote
0answers
29 views

Redirect Curl Calls From Specific IP On Localhost

I've a node server that serves localhost:90, and we need to direct all curl calls from WITHIN the machine on 168.92.168.92 to localhost:90. How can this be achieved? Would this be using iptables? I ...
1
vote
0answers
53 views

Why is “git pull” trying to use CURL_OPENSSL_3 while libcurl4-openssl-dev is installed?

When I run git pull I get the following error: git-remote-https: /usr/lib/x86_64-linux-gnu/libcurl.so.4: version `CURL_OPENSSL_3' not found (required by git-remote-https) Why is git trying to use ...
1
vote
1answer
529 views

Bash script curl input variable from command line

I would like to be able to pass in what environment when script is run. Like script.sh dev ($dev would populate appropriate URL in curl command in script). Maybe even print the environment as options ...
1
vote
0answers
82 views

Curl download speed restricted when down/uploading from stdin/stdout

I'm running 2 curl commands where one downloads all the data into stdout/in until the stack is filled and another uploading whatever is in it out but it seems like the speed is restricted. For the ...
1
vote
0answers
31 views

After setcap on executable, curl_easy_perform throws out of memory error

I've cross compiled an executable to run on Debian Stretch that requires a specific version of cURL (greater than 7.56) to run, and needs specific capabilities during execution. So on the executable ...
1
vote
1answer
265 views

Unable to save Session ID using curl

With the request: curl -i -u pvserver:XXXXXXX 'http://192.168.2.42/api/login.json' I have this output {"salt":"uTxYWQDc9lWwsuHBRfkuTzJYG5M=","session":{"sessionId":2748768190,"roleId":0},"status":{"...
1
vote
1answer
215 views

Save Request url in Curl output

The command below cats a file full of urls and feeds it into gnu parallel. I would like the output in curlresponse.txt to have also the original request url. How can it be done? cat urls.txt | ...
1
vote
0answers
372 views

GET via wget or cURL gives a limited response

I'm bumping my head on a simple HTTP GET request. Using a tool like Postman, I'm getting the full and expected response (an over 1 thousand lines xml document, displaying the details of my 60 albums) ...
1
vote
0answers
321 views

Curl is not supporting SSL (./configure --with-ssl)

I am trying to install curl in opensuse Leap 15.0. I have downloaded the .zip file from this link (version 7.63.0) I am running this command from the curl root directory: ./configure --with-ssl=/usr/...
1
vote
0answers
99 views

How to set connect-timeout value of curl more than 120 sec in linux systems?

Tried curl with connect-timeout value more than 120 sec but it is not waiting for specified time. It stops trying to connect after 120 sec eventhough inputted connect-timeout is 180 sec(more than 120 ...
1
vote
1answer
717 views

Difference between cURL's cookie-jar option and browser cookie?

I'm trying to login to a website using curl and HTTP requests. With the first http GET request I add -c cookie.txt to the command to save the cookie to a file. For the second curl POST I add -b ...
1
vote
0answers
240 views

How to cross compile curl with ftps?

The status of configure are as below. curl version: 7.50.0 Host setup: arm-arago-linux-gnueabi Install prefix: /home/calvin/Downloads/ConnectedDVR/car_dvr_rdk/target/filesys/opt/dvr ...
1
vote
1answer
581 views

Execute as fast as possible many curl commands

I am gathering some data locally at home on a Raspberry Pi and I want to send the data as fast as possible to a REST API (which I own) on a server on the web. The locally gathered data could flow as ...
1
vote
0answers
132 views

openssl hangs on server

I have a problem on the server. Commands wget, curl and dependent commands are not working when a request is via 443 port. Commands hangs on 2-3 minutes and after just say "time out": # curl -v ...
1
vote
0answers
3k views

curl fails TLS handshake… sometimes

I am trying to download Python 3.6.5 using curl as part of the pyenv script to make virtual environments. Sometimes it works, sometimes it doesn't. I pinpointed the command at which it fails to this: ...
1
vote
0answers
465 views

Static build of curl with openssl: `/lib64/libcrypto.so.10: version `OPENSSL_1.0.2' not found`

This error looks like this is not static build - and OpenSSL not inside of curl, but after configure among others I see: ... SSL support: enabled (OpenSSL) ... Build libcurl: Shared=no, Static=...
1
vote
0answers
843 views

how to make cURL send AUTH command for FTPS?

this is causing headache for a long time now. Situation: i have a virtual machine that sits behind a proxy that shields it off the internet. The Proxy seems to work fine. I want to use cURL to ...
1
vote
0answers
456 views

Using curl with certificates on Ubuntu 16.04

I'm trying to use the API for the Swedish payment service Swish on my Ubuntu server, but I can't get it to work. I believe the problem is with the certificates. I have generated a CSR (without a pass ...
1
vote
0answers
368 views

R: how to install RCurl on Debian Linux 9 (stretch)?

I have tried all kind of libcurl apt packages and so forth. I need RCurl for h2o in Debian Stretch. How can I install RCurl in Debian? ** R ** data ** inst ** preparing package for lazy loading ** ...
1
vote
0answers
329 views

Supplying curl with multiple options that require <file or input>

I'm trying to execute a curl command from the terminal. I need to provide HTTP authentication I need to POST a .jar file This works when HTTP authentication is disabled: curl --data-binary @~/file....
1
vote
0answers
6k views

curl 7.58 under proxy issue ssl wrong version

I just installed an Arch based distribution Antergos. Then I installed few packages with pacman. Now after a restart I am getting ssl errors while trying to clone git. fatal: unable to access 'https:...
1
vote
1answer
1k views

Posting to socket using curl

I'm struggling to get curl and socat to play nicely together. The situation is the following: I post XML to login to a system. Return message contains authentication token. I post subsequent requests ...
1
vote
0answers
840 views

Automatic Login with cURL without php

I'm working in a little project using a script to do scraping. I'm trying login in https://www.plusdede.com/login, it's a simple login with a numeric captcha. The code which is important is: <div ...
1
vote
0answers
376 views

Can I wget or download files that are not linked to from a server?

I have a url such as myurl.com/contents and I am trying to fetch all contents in the folder. Some files, such as myurl.com/contents/unlisted-file.1 are not linked to anywhere. These files are ...
1
vote
0answers
746 views

Posting file name and file contents to remote server via curl command

I'm trying to write a bash script that would post the name and content of a local file to a remote server via curl. Local file name has the following format: /tmp/DeviceID-Date.txt For eg. 178-...
1
vote
0answers
1k views

Curl fails on TLS connection: sslv3 alert bad record mac

I'm running a fresh debian stretch installation in a VM using QEMU on a Ubuntu 14.04 host. When I use curl on any HTTPS resource like curl -vL https://get.rvm.io/ I get this error: * Trying 2600:...
1
vote
1answer
3k views

How to upload a file using http PUT with httpie?

For some webserver testing, I use curl for file upload like this: $ curl --silent --digest --user user:pass --upload-file filename http://server/dir/ Now I tried to archive the same function but ...