Questions tagged [curl]

cURL is an HTTP client library and command line tool.

611 questions
353
votes
11 answers

Displaying a remote SSL certificate details using CLI tools

In Chrome, clicking on the green HTTPS lock icon opens a window with the certificate details: When I tried the same with cURL, I got only some of the information: $ curl -vvI https://gnupg.org * Rebuilt URL to: https://gnupg.org/ * Hostname was NOT…
Adam Matan
  • 12,044
  • 19
  • 53
  • 72
104
votes
4 answers

How to test a HTTPS URL with a given IP address

Let's say a website is load-balanced between several servers. I want to run a command to test whether it's working, such as curl DOMAIN.TLD. So, to isolate each IP address, I specify the IP manually. But many websites may be hosted on the server, so…
Martin
  • 3,155
  • 4
  • 17
  • 16
89
votes
4 answers

Difference between `curl -I` and `curl -X HEAD`

I was watching the funny server type from http://www.reddit.com with curl -I http://www.reddit.com when I guessed that curl -X HEAD http://www.reddit.com would do the same. But, in fact, it doesn't. I'm curious about why. This is what I observe…
chmeee
  • 7,180
  • 3
  • 27
  • 43
83
votes
3 answers

Curl: disable certificate verification

I am developing and I need to access https://localhost. I know the certificate will not match. I just want curl to ignore that. Currently it gives me the following error message: curl: (51) SSL peer certificate or SSH remote key was not OK Is it…
blueFast
  • 3,830
  • 12
  • 35
  • 49
51
votes
4 answers

Is there a built-in command-line tool under Windows like wget/curl?

I come from a Linux/Unix background and I have been wondering if Windows has a binary that can download files from the console. I would like to automate a certain process and one of my requirements it to not install much software, but use the…
carlspring
  • 673
  • 1
  • 7
  • 12
48
votes
4 answers

How do I make cURL use keepalive from the command line?

I'm trying to verify that HTTP persistent connections are being used during communication with a Tomcat webserver I've got running. Currently, I can retrieve a resource on my server from a browser (e.g. Chrome) and verify using netstat that the…
Rob Hruska
  • 653
  • 1
  • 5
  • 10
45
votes
7 answers

How to update cURL CA bundle on RedHat?

I am running into issues where the CA bundle that has been bundled with my version of cURL is outdated. curl: (60) SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate…
Andrew
  • 3,223
  • 8
  • 31
  • 34
43
votes
1 answer

Curl POST - 411 Length Required

We have a RestFUL API we build in PHP. If we make the request: curl -u api-key:api-passphrase https://api.domain.com/v1/product -X POST We get back: 411 - Length Required Though if we simply add -d "" onto the request it works and no 411 error. Is…
Justin
  • 4,836
  • 19
  • 55
  • 79
39
votes
7 answers

Default CA Cert Bundle Location

I need to add a .pem cert file to my default CA cert bundle but I don't know where the default CA Cert bundle is kept. I need to append my new .pem file to this default bundle. I'd rather do that than specify my own location using --capath cURL…
Slinky
  • 877
  • 3
  • 13
  • 25
30
votes
4 answers

How to troubleshoot connectivity when curl gets an *empty response*

I want to know how to proceed in troubleshooting why a curl request to a webserver doesn't work. I'm not looking for help that would be dependent upon my environment, I just want to know how to collect information about exactly what part of the…
chad
  • 409
  • 1
  • 4
  • 7
26
votes
8 answers

How is it possible that I can do a host lookup but not a curl?

Has anyone ever seen this before? Note that this happens not only with google.com, but with every domain I try. It's a wireless connection (WEP), but I'm not sure how that would be relevant: $ curl -v google.com # This takes about 60s to return *…
Daniel Quinn
  • 493
  • 2
  • 6
  • 12
24
votes
2 answers

curl (56) Recv failure: Connection reset by peer - when hitting docker container

From an AWS ec2 instance (which runs docker), I am trying to curl my docker container-hosted web service. Given: [ec2-user]$ docker ps CONTAINER ID        IMAGE                                                                COMMAND                …
Kevin Meredith
  • 1,091
  • 2
  • 13
  • 20
23
votes
5 answers

Does CURL cache requests?

This is a pretty long question, so bear with me. I wanted to stress my Akamai Server logged in from an AWS instance. So, I started running ab benchmark. However, they seemed ridiculously fast to download ~3 MB video files. Naturally I wanted to see…
Akshaya Shanbhogue
  • 332
  • 1
  • 2
  • 6
23
votes
4 answers

Execute curl requests in parallel in bash

What is the best way to execute 5 curl requests in parallel from a bash script? I can't run them in serial for performance reasons.
Justin
  • 4,836
  • 19
  • 55
  • 79
22
votes
2 answers

Curl: unable to get local issuer certificate. How to debug?

I’ve got an odd problem. Updated my LAMP dev machine (Debian) to PHP 7. Afterwards I cannot connect to a specific TLS encrypted API via Curl anymore. The SSL cert in question is signed by thawte. curl https://example.com gives me curl: (60) SSL…
Rob
  • 323
  • 1
  • 2
  • 6
1
2 3
40 41