Snog
Registered User
Registered User
Posts: 11
Joined: Sat Aug 01, 2015 3:14 pm
Country: United States

API Curl HTTPS Fails

Thu Aug 02, 2018 10:41 pm

It appears there's a problem with your new SSL certificate.

Programmed cURL calls result in an error that points to your certificate.

Snog
Registered User
Registered User
Posts: 11
Joined: Sat Aug 01, 2015 3:14 pm
Country: United States

Re: API Curl HTTPS Fails

Fri Aug 03, 2018 10:48 am

This may or may not help.

Your using TLS 1.0 which is now considered obsolete, TLS 1.2 is now the norm.

In the past, all calls were to HTTP connections and worked without a problem. Now all calls are being forced to HTTPS and it appears your server is resetting the connection.

Snog
Registered User
Registered User
Posts: 11
Joined: Sat Aug 01, 2015 3:14 pm
Country: United States

Re: API Curl HTTPS Fails

Fri Aug 03, 2018 12:20 pm

Just to add a straight json_decode(file_get_contents('https://www.theaudiodb.com/api/v1/json/{mylicense}/search.php?s=coldplay')) in PHP results in...

[E_WARNING] file_get_contents(): SSL: Connection reset by peer

User avatar
zag
Site Admin
Site Admin
Posts: 1189
Joined: Wed Jun 06, 2012 9:19 am
Country: United Kingdom

Re: API Curl HTTPS Fails

Mon Aug 06, 2018 8:39 am

Maybe something to do with the redirect i'm using in IIS, I will investigate.

Snog
Registered User
Registered User
Posts: 11
Joined: Sat Aug 01, 2015 3:14 pm
Country: United States

Re: API Curl HTTPS Fails

Mon Aug 06, 2018 3:13 pm

zag wrote:Maybe something to do with the redirect i'm using in IIS, I will investigate.

Ahh... IIS, something I know nothing about. And because of that, this is just pure speculation on my part...

It seems like your server might be trying to connect to my server before returning the reply. Which, because there's no public facing IP for my development server, that's not possible and your server might be dropping the reply.

To explain, I have a router with a single public IP assigned to it. My development server is connected to that router, but is not accessible by the public IP. The router handles information returned and routes it to the proper machine. If your server attempts to actually connect to the router's public IP address (instead of just sending the reply), it will fail. And I believe it's that failure that causes the connection to be dropped.

Again, that's pure speculation from a somewhat warped thought process. :D

User avatar
zag
Site Admin
Site Admin
Posts: 1189
Joined: Wed Jun 06, 2012 9:19 am
Country: United Kingdom

Re: API Curl HTTPS Fails

Mon Aug 27, 2018 11:50 pm

Hopefully with the move to TLS this is now fixed, can you confirm?

Snog
Registered User
Registered User
Posts: 11
Joined: Sat Aug 01, 2015 3:14 pm
Country: United States

Re: API Curl HTTPS Fails

Mon Sep 10, 2018 6:09 pm

zag wrote:Hopefully with the move to TLS this is now fixed, can you confirm?

Sorry for the delay in answering.

Yes, that fixed the problem. All seems to be working properly now.

User avatar
zag
Site Admin
Site Admin
Posts: 1189
Joined: Wed Jun 06, 2012 9:19 am
Country: United Kingdom

Re: API Curl HTTPS Fails

Tue Sep 11, 2018 9:05 pm

Good to hear, thanks for reporting and sorry it took so long.

Return to “Developers”