Article

Empty or incomplete HTTPS response body in HTTP client

« Go Back

Information

 
Article Number000062924
EnvironmentProduct: OpenEdge
Version: 11.5.1 , 11.6
OS: All supported platforms
Question/Problem Description
Sometimes an HTTPS response contains an empty content when using the OpenEdge HTTP client.
Sometimes an HTTPS response contains an incomplete content when using the OpenEdge HTTP client.
Sometimes an HTTPS response only contains the HTTP Header when using the OpenEdge HTTP client.
Sometimes the HTTP Body in an HTTPS response is empty when using the OpenEdge HTTP client.

Sometimes the HTTP Body in an HTTPS response is incomplete when using the OpenEdge HTTP client.
Sometimes the last part of an HTTP Body in an HTTPS response is stripped away when using the OpenEdge HTTP client.
If the HTTP body is completely empty, one or more of the error messages below may be displayed.
Steps to Reproduce
Clarifying Information
In OpenEdge 11.5.1 the HTTP request and response info is dumped by adding the SESSION:DEBUG-ALERT = TRUE statement at the beginning of the application. This writes the files "request-raw.txt" and "response-data-received.txt" into the temporary directory or working directory.

In OpenEdge 11.6 the HTTP request and response info is dumped by setting the LOG-MANAGER:LOGGING-LEVEL to 5 at the beginning of the applicationThis writes the files "request-raw.txt" and "response-data-received.txt" into the temporary directory or working directory.
Error MessageJson Parser Error at offset 1: lexical error: invalid char in json text. (16068)
X-NODEREF or X-DOCUMENT LOAD got an error: FATAL ERROR: file 'MEMPTR', line '1', column '1', message 'invalid document structure'. (9082)
Slice size must be positive
Defect/Enhancement NumberDefect PSC00339091
Cause
HTTP client code checks if a socket exists, and then if there is any activity on the socket. In some cases, the last chunk of data is already on the socket at the time of the check so there is no longer any activity. The HTTP client treats this case as though there is no more data on the socket, so that chunk is missing from the response.
Resolution
Upgrade to OpenEdge 11.6.2.
 
Workaround
Notes
A fix  for defect PSC00339091 was also included in OpenEdge service pack 11.6.1. This fix required setting an environment variable SSL_SOCKET_READ to TRUE. However, this fix introduced an additional defect PSC00346086 that causes the OpenEdge client to crash under certain circumstances. See article 000067352 in the references below for more information. Upgrading to OpenEdge 11.6.2, where both defects are fixed and SSL_SOCKET_READ is no longer required, is preferred.

The following information about the SSL_SOCKET_READ environment variable in connection with the fix for PSC00339091 is missing from the 11.6.1 release notes:
 
In order to avoid the data loss problem over HTTP, there is a new environment variable introduced, name as “SSL_SOCKET_READ”.
If this environment variable is set at client (i.e. ABL side), it will wait till all the data receive from the socket, after getting complete response (i.e. data), it will return in order to avoid the data loss issue.
How to set/use this property?
  1. Stop the client.
  2. Set the environment variable  “SSL_SOCKET_READ=true”
  3. Restart the client.
 
References to Other Documentation: 

OpenEdge Development: Programming Interfaces, Chapter 6, "Making HTTP(S) requests from ABL applications"

Progress Article(s):

000067352, OE 11.6.1 client session crashes when SSL_SOCKET_READ=TRUE
000067658, Cannot set SSL_SOCKET_READ in ABL code
Attachment 
Last Modified Date6/30/2017 10:09 AM


Feedback
 
Did this article resolve your question/issue?

   

Your feedback is appreciated.

Please tell us how we can make this article more useful. Please provide us a way to contact you, should we need clarification on the feedback provided or if you need further assistance.

Characters Remaining: 1025