@ -319,6 +319,7 @@ class testHTTPServer_RequestHandler(BaseHTTPRequestHandler):
lFileObject . close ( )
# ResponseContentTypeFile
def ResponseDictSend ( self ) :
lL = gSettingsDict [ " Logger " ]
inResponseDict = self . OpenRPAResponseDict
# Send response status code
self . send_response ( inResponseDict [ " StatusCode " ] )
@ -329,9 +330,12 @@ class testHTTPServer_RequestHandler(BaseHTTPRequestHandler):
for lItemKey , lItemValue in inResponseDict [ " SetCookies " ] . items ( ) :
self . send_header ( " Set-Cookie " , f " { lItemKey } = { lItemValue } " )
#Close headers section in response
self . end_headers ( )
# Write content as utf-8 data
self . wfile . write ( inResponseDict [ " Body " ] )
try :
self . end_headers ( )
# Write content as utf-8 data
self . wfile . write ( inResponseDict [ " Body " ] )
except ConnectionResetError as e :
if lL : lL . warning ( f " An existing connection was forcibly closed by the remote host - OK for the network interactions (ConnectionResetError: [WinError 10054]) " )
def do_GET ( self ) :
try :
self . OpenRPA = { }