Hi,
I have a couple of possibly related queries regarding my Sparkle server :
-
My Sparkle server logs incoming requests in the ProcessRequest method, and then updates the log entry with the date/time completed at the end of the request, after the response has been sent to the client. Very occasionally (10 out of 50,000 requests), the log entry doesn't get updated with the date/time completed. Is it possible for a Sparkle request to fail to complete, if for example the client application 'killed' its connection? Or will the request always complete even if the client's connection is lost?
-
Is it OK to read properties of the server context object (THttpServerContext) after calling Response.Close? I know I can't write to properties, but just wanted to check that reading is OK? For example :
C.Response.Close(TEncoding.UTF8.GetBytes('A plain text response.'));
intConnectionID := C.Request.User.Claims.Items['connection_id'].AsInteger;
intStatusCode := C.Response.StatusCode;
sStatusReason := C.Response.StatusReason;
Many thanks,
Ian