Change %Response.ContentLength
Hey everyone,
Might be a stupid question, but i was trying to set the ContentLength of the %response object in my website.
In different places (like the onPreHttp / onPostHttp etc) but none seems to work.
The reason behind it is to send a more accurate representation of the actual data I send, instead of having the overhead of the broker that adds more characters , I want the exact length of the response accounting only for the data that I actually returned.
Product version: IRIS 2020.3
see docs: https://docs.intersystems.com/ens201813/csp/documatic/%25CSP.Documatic.cls?LIBRARY=%25SYS&CLASSNAME=%25CSP.Response#ContentLength
• property ContentLength as %String;
Trying to set %response.ContentLength in the OnPreHTTP() did NOT work...
Also part of the problem is that some responses has the response header "transfer-encoding: chunked"
which prevents having ContentLength anyway, but that is a different problem.
The %resposne.ContentLength doesnt change the actual value