Jump to content
Incus J

Send a custom error document for 404 Not Found ?

Recommended Posts

In OverbyteIcsHttpServ, the error procedures such as THttpConnection.Answer404 are called from various places in the code and have hard coded HTML.  I'd like to serve my own error document instead.  Is there a built in mechanism to supply a custom HTML error document for errors such as 404, 403 ?

Share this post


Link to post

To send custom error responses you can create overloaded versions of Answer404, etc, in your version of THttpConnection or THttpAppSrvConnection.

 

Angus

 

  • Thanks 1

Share this post


Link to post

Perfect - I had missed the virtual nature of Answer404 - Thank you!

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×