@ -319,6 +319,7 @@ class testHTTPServer_RequestHandler(BaseHTTPRequestHandler):
lFileObject . close ( )
lFileObject . close ( )
# ResponseContentTypeFile
# ResponseContentTypeFile
def ResponseDictSend ( self ) :
def ResponseDictSend ( self ) :
lL = gSettingsDict [ " Logger " ]
inResponseDict = self . OpenRPAResponseDict
inResponseDict = self . OpenRPAResponseDict
# Send response status code
# Send response status code
self . send_response ( inResponseDict [ " StatusCode " ] )
self . send_response ( inResponseDict [ " StatusCode " ] )
@ -329,9 +330,12 @@ class testHTTPServer_RequestHandler(BaseHTTPRequestHandler):
for lItemKey , lItemValue in inResponseDict [ " SetCookies " ] . items ( ) :
for lItemKey , lItemValue in inResponseDict [ " SetCookies " ] . items ( ) :
self . send_header ( " Set-Cookie " , f " { lItemKey } = { lItemValue } " )
self . send_header ( " Set-Cookie " , f " { lItemKey } = { lItemValue } " )
#Close headers section in response
#Close headers section in response
self . end_headers ( )
try :
# Write content as utf-8 data
self . end_headers ( )
self . wfile . write ( inResponseDict [ " Body " ] )
# 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 ) :
def do_GET ( self ) :
try :
try :
self . OpenRPA = { }
self . OpenRPA = { }