1. David Peace (Powersoft)
  2. PowerBuilder
  3. Friday, 6 November 2020 15:11 PM UTC

Hi All

We have been using the HTTPClient successfully for months in one of our applications, it has stopped working and the following code returns a -1 for the call and an empty string for the responsetext. The odd thing is that the same EXE works on Windows 10, but not on Win 7 or 8. The Version is PB2017R3 Build 1915.

As far as we can tell nothing has changed at the client side, but we cannot say the same for the server side.

The sendrequest returns -1 and getresponsestatustext is empty. Not much to go on really.

Any thoughts please?

*****************************************************************************

l_http = Create httpclient
l_http.autoreaddata = true
l_http.secureprotocol = 5    // TLS 1.2
l_http.timeout = 60

// prepare header
lul_length = Len(ls_data)
li_rc = l_http.clearrequestheaders( )
li_rc = l_http.SetRequestHeader("Content-Length", String(lul_length))
li_rc = l_http.SetRequestHeader("Content-Type", 'application/json;charset=utf-8')
li_rc = l_http.SetRequestheader( 'Host', is_host)
li_rc = l_http.SetRequestheader( 'Connection', 'Keep-Alive')
li_rc = l_http.SetRequestheader( 'User-Agent', 'Apache-HttpClient/4.1.1 (java 1.5)')
li_rc = l_http.SetRequestheader( 'Accept', 'application/json')

//post request
li_rc = l_http.sendrequest( 'POST',  'https://' + is_host + '/mpay2-service/auth/login', ls_data)
if li_rc < 0 then
    ls_rc = l_http.getresponsestatustext( )
    messagebox('Pax2Pay','Response Text (' + ls_rc + ') recieved from Pax2Pay Logon Send request')
end if

*****************************************************************************

 

Accepted Answer
David Peace (Powersoft) Accepted Answer Pending Moderation
  1. Monday, 9 November 2020 17:24 PM UTC
  2. PowerBuilder
  3. # Permalink

Here is the solution for those it may help in the future:

We eventually pushed it back to Pax2Pay. Who apparently had changed their SSL settings on the servers. This was their response after much debugging on our behalf.

A nginx upgrade removed some older cipher suites from the default supported suites, specifically ECDHE-RSA-AES256-SHA384 and ECDHE-RSA-AES128-SHA256.
Added those back in.

Comment
  1. Armeen Mazda @Appeon
  2. Monday, 9 November 2020 17:41 PM UTC
Thanks for sharing the solution!
  1. Helpful
There are no comments made yet.
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Friday, 6 November 2020 16:11 PM UTC
  2. PowerBuilder
  3. # 1

Hi David,

Even if the server side changed, a server side problem generally would cause all clients to fail rather than just Windows 7/8 users.  I think the issue is client side.

Are the Windows 10 users running the exact same code as Windows 7/8 users?

Are all Windows 7/8 users having the problem or only some?

If you disable the anti-virus on the problematic machines does it resolve?

Best regards,
Armeen

 

Comment
  1. David Peace (Powersoft)
  2. Monday, 9 November 2020 17:23 PM UTC
Hi Armen



Thanks for the input, Just for clarity, no virus checkers involved. Same exe and runtimes on all machines.



We eventually pushed it back to Pax2Pay. Who apparently had changed their SSL settings on the servers. This was their response after much debugging on our behalf.



A nginx upgrade removed some older cipher suites from the default supported suites, specifically ECDHE-RSA-AES256-SHA384 and ECDHE-RSA-AES128-SHA256.

Added those back in.



It worked fine on Win10, but not Win 7 & 8. We test in all these environments just to be on the safe side. I wish Pax2Pay had done the same they would have saved us a load of problems.



Good news it was not a PB problem and we are back working again.



Cheers



  1. Helpful
  1. Armeen Mazda @Appeon
  2. Monday, 9 November 2020 17:40 PM UTC
I can understand EOL Windows 7 version possibly having issues, but it is very strange that there was such difference in Windows 8 vs. Windows 10. Anyway, glad to hear it wasn't a PowerBuilder issue and that it is now resolved.
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.