-
- Downloads
vhost: add 404 handler url option
This allows you to set a 404 handler URL on a vhost. The necessary user code looks like... info.error_document_404 = "/404.html"; ... at vhost-creation time. In the existing lws_return_http_status() api, if it sees the vhost has an "error_document_404" path set and that we are trying to report a 404, it changes the action instead to a redirect to the error_document_404 path. The redirect target is returned using 404 status code. If the redirect target doesn't exist, then it falls back to just reporting the simple canned 404.
Showing
- lib/context.c 5 additions, 0 deletionslib/context.c
- lib/header.c 14 additions, 0 deletionslib/header.c
- lib/libwebsockets.h 4 additions, 0 deletionslib/libwebsockets.h
- lib/private-libwebsockets.h 2 additions, 0 deletionslib/private-libwebsockets.h
- lib/server/lejp-conf.c 6 additions, 0 deletionslib/server/lejp-conf.c
- lib/server/server.c 8 additions, 0 deletionslib/server/server.c
- minimal-examples/minimal-http-server/minimal-http-server.c 1 addition, 0 deletionsminimal-examples/minimal-http-server/minimal-http-server.c
Loading
Please register or sign in to comment