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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...