1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-23 00:00:06 +01:00
libwebsockets/lib/server
Andy Green b490079b47 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.
2018-03-08 09:01:14 +08:00
..
access-log.c ACCESS_LOG: log with NOTICE if no file set up 2018-01-04 10:48:43 +08:00
cgi.c pthreads: more locking 2018-03-05 16:49:28 +08:00
daemonize.c daemonize: fix missing lws_malloc reason param 2017-10-18 20:19:46 +08:00
fops-zip.c appveyor: Enable 64-bit build with OpenSSL and HTTP2 2017-11-26 19:16:17 +08:00
lejp-conf.c vhost: add 404 handler url option 2018-03-08 09:01:14 +08:00
lws-spa.c coverity-fixes 2017-11-10 10:59:58 +08:00
parsers.c h1: header parsing optimizations 2018-03-07 18:19:10 +08:00
peer-limits.c build: enable signed vs unsigned warnings on gcc 2017-10-25 07:17:29 +08:00
ranges.c refactor: subdirs for source in lib 2017-10-16 17:28:37 +08:00
rewrite.c refactor: subdirs for source in lib 2017-10-16 17:28:37 +08:00
server-handshake.c plat: remove esp8266 2017-12-01 11:37:36 +08:00
server.c vhost: add 404 handler url option 2018-03-08 09:01:14 +08:00
ssl-server.c pthreads: more locking 2018-03-05 16:49:28 +08:00