Lucee
Lucee copied to clipboard
Added server time in 5.3 latest
@zspitzer now I saw server timings in chrome dev tool
There is one problem with this code that need to be addressed and one concern (see tickets for detail). you cannot do this code in CFML "getPageContext().getHttpServletResponse().isCommitted()", if "direct java access" is disabled in the Security/access Page in the server admin, you will get an exception with that code. This template should not be affected by different admin settings.
The solution is not to test and simply catch the exception if they occur OR add a function to lucee (isFlushed) that gives this info.
IsFlushed would be useful, it should be available.
Is there something like the old asp isConnected() available?
On Mon., 7 May 2018, 19:00 Michael Offner, [email protected] wrote:
There is one problem with this code that need to be addressed and one concern (see tickets for detail). you cannot do this code in CFML "getPageContext().getHttpServletResponse().isCommitted()", if "direct java access" is disabled in the Security/access Page in the server admin, you will get an exception with that code. This template should not be affected by different admin settings.
The solution is not to test and simply catch the exception if they occur OR add a function to lucee (isFlushed) that gives this info.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/lucee/Lucee/pull/468#issuecomment-387003775, or mute the thread https://github.com/notifications/unsubscribe-auth/AAaBpD26B7spvYoMzOvyoizgKqHQERttks5twA1FgaJpZM4Tf56a .
@zspitzer no there is no isConnected, but i like the idea, i will add both if possible, i'm not sure if the servlet engine is providing that kind of info. I know that not all servlet engine are handling this in the same way. Some are stopping the request when the client disconnect, some don't.
every function we add brings the risk to break code in case user have the same function already in use. So instead of having 2 functions i prefer to have only one GetContextInfo():{flushed:...,connected:...}
https://stackoverflow.com/questions/2962196/detecting-client-disconnect-in-tomcat-servlet
added getContextInfo https://luceeserver.atlassian.net/browse/LDEV-1866 (ATM only provide flushed, more to come), can you adapt this function?
I've been following the Firefox implementation of this, they mentioned Trailer headers
https://bugzilla.mozilla.org/show_bug.cgi?id=1403051 https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Trailer
@zspitzer what is the status on this?
this is very old if this still makes sense @cfmitrah @zspitzer please make a PR for Lucee 6.1