I am using Intraweb 16.2.4 with Rad Studio Athens (C++ Builder)
I created a TContentHandler which is supposed to send a HTTP response 204 to the server sending the POST request:
THandlers::Add("", "myhandler", new MyTContentBase());
The POST Url is https://www.mydomain.com/myhandler
If I test it with Rad Studio REST Debugger, I get the expected response sent by my TContentHandler: 204 (nothing to be returned)
But when the server (a Twilio Server) send the POST request, it first seems to be working, then it gets the response below:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name='viewport' content='width=device-width, initial-scale=1'>
<title></title>
<script nonce="8g0lADvTJQAPKt1IoVJ+uVzmTTs">function getWS(){var o=0,l=0,t=document,r=window.devicePixelRatio||1;return"CSS1Compat"==t.compatMode?(o=Math.max(t.body.scrollWidth,t.documentElement.scrollWidth),l=Math.max(t.body.scrollHeight,t.documentElement.scrollHeight))
o=t.body.scrollWidth,l=t.body.scrollHeight),[o,l,r]}function cookieCheck(){var o=navigator,e=document,i=!!o.cookieEnabled;return void 0!==o.cookieEnabled||i||(e.cookie="testcookie",i=-1!=e.cookie.indexOf("testcookie")),i}function isIFrame(){if(window.location!==window.parent.location)return 1;return 0;}function init() {if(!cookieCheck()){alert("This application requires cookies to be enabled. Please enable cookies in your browser's settings, close your current web session and try again.");throw "Cookies are disabled.";}var s = getWS();var f = document.forms[0];f.elements["IW_width"].value = s[0];f.elements["IW_height"].value = s[1];f.elements["IW_dpr"].value = s[2];f.elements["IW_iframe"].value = isIFrame(); f.submit();}</script>
</head>
<body>
<form method=post action="/?AccountSid=&Hold=false&Muted=false&SequenceNumber=1&StartConferenceOnEnter=true&StatusCallbackEvent=participant-join&Timestamp=Sat, 29 Aug 2026 01:17:31 +0000">
<input type=hidden name="IW_width">
<input type=hidden name="IW_height">
<input type=hidden name="IW_dpr">
<input type=hidden name="IW_iframe">
<input type=hidden name="IW_SessionID_" value="sbOFyXruzqeZFPneOENgcNbBGtC">
<input type=hidden name="IW_TrackID_" value="1">
<input type=hidden name="IW_WindowID_" value="l88Os8sKLIbJ2zvpQneeVxT2kJG">
<input type=hidden name="IW_RestartCheck_">
<script nonce="8g0lADvTJQAPKt1IoVJ+uVzmTTs">init();</script>
</form>
</body>
</html>
The code of the response 200 which seems Ok.
But in fact it is an error response sent by the Intraweb application:
"This application requires cookies to be enabled. Please enable cookies in your browser's settings, close your current web session and try again."
And it seems to be related to the option CookieOptions > RuncookieCheck.
The CookieOptions in my applications are:
HttpOnly=true
SameSite=ssoLax
Secure=true
SessionCookies=true
UseCookies=true
For sure I cannot ask users to go change cookies settings in their browsers before to be able to use my application!
So, how to resolve this?
I created a TContentHandler which is supposed to send a HTTP response 204 to the server sending the POST request:
THandlers::Add("", "myhandler", new MyTContentBase());
The POST Url is https://www.mydomain.com/myhandler
If I test it with Rad Studio REST Debugger, I get the expected response sent by my TContentHandler: 204 (nothing to be returned)
But when the server (a Twilio Server) send the POST request, it first seems to be working, then it gets the response below:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name='viewport' content='width=device-width, initial-scale=1'>
<title></title>
<script nonce="8g0lADvTJQAPKt1IoVJ+uVzmTTs">function getWS(){var o=0,l=0,t=document,r=window.devicePixelRatio||1;return"CSS1Compat"==t.compatMode?(o=Math.max(t.body.scrollWidth,t.documentElement.scrollWidth),l=Math.max(t.body.scrollHeight,t.documentElement.scrollHeight))
o=t.body.scrollWidth,l=t.body.scrollHeight),[o,l,r]}function cookieCheck(){var o=navigator,e=document,i=!!o.cookieEnabled;return void 0!==o.cookieEnabled||i||(e.cookie="testcookie",i=-1!=e.cookie.indexOf("testcookie")),i}function isIFrame(){if(window.location!==window.parent.location)return 1;return 0;}function init() {if(!cookieCheck()){alert("This application requires cookies to be enabled. Please enable cookies in your browser's settings, close your current web session and try again.");throw "Cookies are disabled.";}var s = getWS();var f = document.forms[0];f.elements["IW_width"].value = s[0];f.elements["IW_height"].value = s[1];f.elements["IW_dpr"].value = s[2];f.elements["IW_iframe"].value = isIFrame(); f.submit();}</script></head>
<body>
<form method=post action="/?AccountSid=&Hold=false&Muted=false&SequenceNumber=1&StartConferenceOnEnter=true&StatusCallbackEvent=participant-join&Timestamp=Sat, 29 Aug 2026 01:17:31 +0000">
<input type=hidden name="IW_width">
<input type=hidden name="IW_height">
<input type=hidden name="IW_dpr">
<input type=hidden name="IW_iframe">
<input type=hidden name="IW_SessionID_" value="sbOFyXruzqeZFPneOENgcNbBGtC">
<input type=hidden name="IW_TrackID_" value="1">
<input type=hidden name="IW_WindowID_" value="l88Os8sKLIbJ2zvpQneeVxT2kJG">
<input type=hidden name="IW_RestartCheck_">
<script nonce="8g0lADvTJQAPKt1IoVJ+uVzmTTs">init();</script>
</form>
</body>
</html>
The code of the response 200 which seems Ok.
But in fact it is an error response sent by the Intraweb application:
"This application requires cookies to be enabled. Please enable cookies in your browser's settings, close your current web session and try again."
And it seems to be related to the option CookieOptions > RuncookieCheck.
The CookieOptions in my applications are:
HttpOnly=true
SameSite=ssoLax
Secure=true
SessionCookies=true
UseCookies=true
For sure I cannot ask users to go change cookies settings in their browsers before to be able to use my application!
So, how to resolve this?

