go to the WebServer procedures, to source,
You can add code to the start or the
ThisWebServer.StartNewThread
method.
Yoou'll see there's already some code there;
If (self.performance.NumberOfThreads >= self.MaxThreads and self.MaxThreads > 0) or loc:shuttingDown
if loc:RequestData.RequestMethodType <> NetWebServer_DELETESESSION and PoolWaiting = 0
self.SendError(500,'Server Busy','Server Busy, try again shortly')
self._PerfEndThread(0,0,500) ! Errors are counted, but otherwise not included in stats
do UpdateStats
dispose(p_RequestData.DataString)
end
return
End
You can add your own code just before that to do your own test, and response.
I recommend perhaps a 503 error;
503 Service Unavailable
The server is currently unavailable (because it is overloaded or down for maintenance). Generally, this is a temporary state.[65]
Cheers
Bruce