summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_http_static.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2021-07-23Router: split nxt_http_static_conf_t from nxt_http_action_t.Zhidao HONG1-62/+157
No functional changes.
2021-05-26Static: handled unknown MIME types when MIME-filtering active.Oisin Canty1-18/+14
2021-05-26MIME: added PHP.Oisin Canty1-0/+2
2021-05-06Static: implemented MIME filteringOisin Canty1-4/+35
2021-05-05Fixed format and arguments mismatches in error log messages.Zhidao HONG1-2/+2
2021-05-05Fixed building without openat2().Zhidao HONG1-1/+3
2021-04-29Static: support for openat2() features.Zhidao HONG1-26/+97
Support for chrooting, rejecting symlinks, and rejecting crossing mounting points on a per-request basis during static file serving.
2021-04-22Router: grouped app and share fields in nxt_http_action_t.Zhidao HONG1-6/+6
This is a prerequisite for further introduction of openat2() features. No functional changes.
2020-12-23Static: fixing request memory pool leakage in router.Max Romanov1-3/+20
When a static file larger than NXT_HTTP_STATIC_BUF_SIZE (128K) is served, two buffers are allocated and chained; each retains the whole request memory pool. Starting from 41331471eee7, the completion handler was called once for a linked buffer chain, but the second buffer got lost. This patch improves the completion handler's treatment of static buffers to handle all linked buffers.
2020-09-29MIME: added AVIF and APNG image formats.Valentin Bartenev1-1/+4
AVIF is a modern image format based on the AV1 video codec. It generally has better compression than other widely used formats (WebP, JPEG, PNG, and GIF) and is designed to supersede them. Support was already added to the latest version of Chrome. APNG extends PNG to permit animated images that work similarly to animated GIF. It's supported by most modern browsers. Also removed duplicated ".svg" entry.
2020-05-20Static: fixed potential undefined behavior in memcpy().Valentin Bartenev1-1/+1
According to the C standard, pointer arguments passed to memcpy() calls shall still have valid values. NULL is considered as invalid. Found with GCC Static Analyzer.
2020-03-03Added a "fallback" option to be used with the "share" action.Valentin Bartenev1-0/+13
It allows proceeding to another action if a file isn't available. An example: { "share": "/data/www/", "fallback": { "pass": "applications/php" } } In the example above, an attempt is made first to serve a request with a file from the "/data/www/" directory. If there's no such file, the request is passed to the "php" application. Fallback actions may be nested: { "share": "/data/www/", "fallback": { "share": "/data/cache/", "fallback": { "proxy": "http://127.0.0.1:9000" } } }
2019-11-14Initial proxy support.Igor Sysoev1-1/+1
2019-11-14Replacing pass with action.Igor Sysoev1-4/+4
2019-09-24Static: returning 404 for Unix domain sockets.Valentin Bartenev1-0/+11
It's now similar to how attempts to access other non-regular files are handled.
2019-09-20Fixed segfault if an inappropriate file system object is requested.Valentin Bartenev1-1/+2
Found by Coverity (CID 349483).
2019-09-19Basic support for serving static files.Valentin Bartenev1-0/+599