FoxPro Programming
Can't access https:\\ work for http://
Gravatar is a globally recognized avatar based on your email address. Can't access https:\\ work for http://
  Viren Patel
  All
  Jun 19, 2017 @ 03:52pm

I am using your product west wind web connection for long time. Works great but recently I am having issue with one of the url. the provider web site is change to https from http. and now the code stop working.

Here is the code used to work

loIP = CREATE("WWIPStuff")

liTemp = loIP.HTTPConnect("http://wwwapps.ups.com")

lnResult = loIP.HTTPGetEx("/WebTracking/track", @lcReturn1) loIP.HTTPClose()

Recently the wenb address is changed to https://wwwapps.ups.com

So I have updated to

liTemp = loIP.HTTPConnect("https://wwwapps.ups.com")

lnResult = loIP.HTTPGetEx("/WebTracking/track", @lcReturn1) loIP.HTTPClose()

Respone lnResult says 12005 Invalid Url.

Is there anything wrong in code or need some different method Thank you

Virendra Patel

Gravatar is a globally recognized avatar based on your email address. re: Can't access https:\\ work for http://
  Rick Strahl
  Viren Patel
  Jun 19, 2017 @ 11:28pm

If you use the syntax you are using you can't specify a URL in the domain name parameter for HttpConnect() - you have to specify a domain, then set lSecureLink to .T..

However that syntax is outdated anyway and I highly recommend you use the newer and much easier syntax:

DO wwhttp

loHttp = CREATEOBJECT("wwHttp")
? lohttp.HttpGet("https://wwwapps.ups.com/WebTracking/track")
RETURN

It's also possible if you're using a really old version of Windows (XP!) you won't have the right version of TLS support and it might refuse the connection. Nothing that can be done about that as the Windows stack on XP (and Vista I believe) doesn't support TLS 1.2.

Lots of sites are just now switching to TLS 1.2 (due to vulnerabilities in TLS 1.1 and older) and this will affect any apps accessing SSL/TLS on old Windows versions. If that's the case - it's time to upgrade.

+++ Rick ---

© 1996-2017