diff options
author | Glenn Strauss <gstrauss@gluelogic.com> | 2021-05-03 22:18:20 -0400 |
---|---|---|
committer | Glenn Strauss <gstrauss@gluelogic.com> | 2021-05-06 17:35:00 -0400 |
commit | 9a5e1652bef3d392b0b698eda1dafbfa771a1f92 (patch) | |
tree | 772aa94b2ea9c6f51caa18640d7d8ee5ff252b83 /src/response.h | |
parent | 7ff6adc44c498f465cf247da03a44a6717fc1502 (diff) | |
download | lighttpd-git-9a5e1652bef3d392b0b698eda1dafbfa771a1f92.tar.gz |
[multiple] static file optimization; reuse cache
reuse cache lookup in common case of serving a static file
rather than repeating the stat_cache_entry lookup
(which is more work than memcmp() to re-check stat_cache_entry match)
Diffstat (limited to 'src/response.h')
-rw-r--r-- | src/response.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/response.h b/src/response.h index 05a7a1fc..4b9943eb 100644 --- a/src/response.h +++ b/src/response.h @@ -8,6 +8,8 @@ #include "buffer.h" #include "array.h" +struct stat_cache_entry;/* declaration */ + int http_response_parse(server *srv, request_st *r); enum { @@ -47,7 +49,7 @@ const buffer * http_response_set_last_modified(request_st *r, time_t lmtime); int http_response_handle_cachable(request_st *r, const buffer *lmod, time_t lmtime); void http_response_body_clear(request_st *r, int preserve_length); void http_response_reset(request_st *r); -void http_response_send_file (request_st *r, buffer *path); +void http_response_send_file (request_st *r, buffer *path, struct stat_cache_entry *sce); void http_response_backend_done (request_st *r); void http_response_backend_error (request_st *r); void http_response_upgrade_read_body_unknown(request_st *r); |