Jump to content

ServerModule.UniGUIServerModuleHTTPCommand Intercept URI and Return Customised HTML


andyhill

Recommended Posts

I capture the URI inside the UniGUIServerModuleHTTPCommand Event, build custom HTML and return to Client. For small HTML Script it works but larger HTML crashes (MyList.Text contains the HTML Script) - please advise how - thanks in advance.        

////////////////////////////////////////////////////////////////////////
AResponseInfo.ResponseText:= MyList.Text;
AResponseInfo.ResponseNo:= 200;
AResponseInfo.CloseConnection:= True;
AResponseInfo.CloseSession;
Handled:= True;
 

Link to comment
Share on other sites

Size of Custom HTML Script is 234k and renders correctly if loaded into the browser.

If it is a small Script I get the HTML Rendered as expected, if it is large I get "200 OK" 

I use this at the beginning of the script:-

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>

...

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...