delphi - Indy 10 TIdHttpServer missing MaxConnectionReply property -


i using indy10 , have created web server using class derived tidhttpserver. in subclass override domaxconnectionsexceeded method. , seems firing when maxconnections exceeded.

in earlier indy versions, @ least according remy lebeau's comment here, there maxconnectionreply property on tidhttpserver. used create custom messages if maxconnections exceeded. doesn't seem case indy 10.

is there way indy10 can create custom messages when maxconnections exceeded?

as stated in thread linked to, maxconnectionreply implemented tidcmdtcpserver, tidhttpserver not derive from. since overriding domaxconnectionsexceeded(), have send own reply client manually, , make sure http-formatted, example:

procedure tmyhttpserver.domaxconnectionsexceeded(aiohandler: tidiohandler); var   html: tidbytes; begin   html := tobytes('<html><body>500 - many connections</body></html>');   aiohandler.writeln('http/1.0 500 many connections');   aiohandler.writeln('content-type: text/html');   aiohandler.writeln('content-length: ' + inttostr(html));   aiohandler.writeln('connection: close');   aiohandler.writeln;   aiohandler.write(html); end; 

Comments

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

java Extracting Zip file -

php - HTTP_REFERER woes: How can I allow access to a specific page, only when a visitor has visited another specific page beforehand? -