1. Roland Smith
  2. PowerBuilder
  3. Thursday, 28 March 2019 16:02 PM UTC

I'm calling a server side program from a PB 2017 desktop app and getting a different result using HTTPClient verses my WinHTTP code example.

The response text returned by HTTPClient is often short, truncating a few characters off the end. I run the same server program via WinHTTP and I get the full response text.

My question is whether this is a bug in HTTPClient or maybe there is an issue with how the server side program forms the response. The Content-Type is text/plain. The response is fairly short, under 10 characters. It contains two values separated by char(11).

http://www.topwizprogramming.com/freecode_winhttp.html

 

Roland Smith Accepted Answer Pending Moderation
  1. Thursday, 28 March 2019 20:30 PM UTC
  2. PowerBuilder
  3. # 1

I just added my test case and a Classic ASP file which will return the string. Edit the ASP file to change the number of characters.

Comment
  1. Chris Pollach @Appeon
  2. Thursday, 28 March 2019 20:44 PM UTC
Thanks Roland ... I see it now!



It works OK for me by changing ....



lnv_http.GetResponseBody ( ls_recvdata)

- to -

lnv_http.GetResponseBody ( ls_recvdata, EncodingANSI! )



Regards ... Chris
  1. Helpful
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Thursday, 28 March 2019 18:48 PM UTC
  2. PowerBuilder
  3. # 2

I developed a test app which makes the same call via HTTPClient, WinHTTP, and the Msxml2.XMLHTTP OLE control.

The issue in HTTPClient occurs when the response is 4 or less characters.

I'll add a bug report.

 

 

Comment
  1. Roland Smith
  2. Thursday, 28 March 2019 19:00 PM UTC
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 28 March 2019 16:29 PM UTC
  2. PowerBuilder
  3. # 3

Hi Roland;

  My suggestion would be to open a Support Ticket on this aspect and attach your WinHTTP and your HTTPClient test cases for Appeon to look at. Of course, you are always welcome to attach these test cases to this Community Post as well. Maybe we can then spot something to help and/or confirm the issue.

Regards ... Chris

Comment
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.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.