Solved TD-23491: [TD63/TD70] HTTPRequest class: fails when response initialised with STRING_Null

Report TD 5.x and 6.x bugs and possible workarounds.
Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 3498
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

TD-23491: [TD63/TD70] HTTPRequest class: fails when response initialised with STRING_Null

Post by Dave Rabelink » 13 Apr 2017, 08:34

Using HTTPRequest class from xmllib.apl.

Issue found on TD63 and TD70
(not tested in earlier versions)

When response string was initialized with "" before getting the response, the received response string is OK
When response string was initialized with STRING_Null before getting the response, the sample FAILS:
  • String has a buffer length
  • Tooltip in IDE shows the content of the variable and seems ok
  • String can not be used in API functions
  • TD can crash on API functions when string is used
  • Content of string can not be accessed
So there is a clear difference how a STRING_Null and "" buffer is handled in HTTPRequest.

Both ways of initializing the variable must be supported.
When STRING_Null, the buffer is corrupted and can lead to issues.

See testcase.

HTTPRequest-StringNull_or_Empty.zip
  • First use: press test button to see the HTTPRequest works ok.
    It gets the response from http://www.google.com.
    After the request, the response is displayed in multiline and a text is searched in the response.
  • Check checkbox to make it fail. It will then use STRING_Null as init.
  • See uncommented code to make TD give errors or crash.
Sample is in TD63 format and a copy of the sample in TD70 format.

This defect has been registered as :
Ticket # 3013577: HTTPRequest class: fails when response initialised with STRING_Null

When TD defect number is known, I will update this thread.
You do not have the required permissions to view the files attached to this post.
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 3498
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Re: TD-23491: [TD63/TD70] HTTPRequest class: fails when response initialised with STRING_Null

Post by Dave Rabelink » 01 Jun 2017, 06:58

The defect number is:

TD-23491: HTTPRequest may crash TD when response string is initialised with STRING_Null

OpenText Knowledge base article:
https://knowledge.opentext.com/knowledg ... /KB4999499
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 3498
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Re: TD-23491: [TD63/TD70] HTTPRequest class: fails when response initialised with STRING_Null

Post by Dave Rabelink » 19 Jul 2017, 07:05

This issue is fixed in TD 6.3.9
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

Return to “Bug Reports”

Who is online

Users browsing this forum: [Ccbot] and 12 guests