Lucee icon indicating copy to clipboard operation
Lucee copied to clipboard

Added server time in 5.3 latest

Open cfmitrah opened this issue 6 years ago • 9 comments

cfmitrah avatar Apr 23 '18 13:04 cfmitrah

@zspitzer now I saw server timings in chrome dev tool

cfmitrah avatar Apr 26 '18 08:04 cfmitrah

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.

micstriit avatar May 07 '18 09:05 micstriit

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 avatar May 07 '18 10:05 zspitzer

@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.

micstriit avatar May 24 '18 07:05 micstriit

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:...}

micstriit avatar May 25 '18 06:05 micstriit

https://stackoverflow.com/questions/2962196/detecting-client-disconnect-in-tomcat-servlet

micstriit avatar May 25 '18 06:05 micstriit

added getContextInfo https://luceeserver.atlassian.net/browse/LDEV-1866 (ATM only provide flushed, more to come), can you adapt this function?

micstriit avatar May 25 '18 07:05 micstriit

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 avatar May 30 '18 01:05 zspitzer

@zspitzer what is the status on this?

michaeloffner avatar Nov 05 '21 16:11 michaeloffner

this is very old if this still makes sense @cfmitrah @zspitzer please make a PR for Lucee 6.1

michaeloffner avatar Feb 09 '24 16:02 michaeloffner