diff options
author | Glenn Strauss <gstrauss@gluelogic.com> | 2019-11-25 01:54:08 -0500 |
---|---|---|
committer | Glenn Strauss <gstrauss@gluelogic.com> | 2020-07-08 19:54:28 -0400 |
commit | 010c28949c17f3a846d78e4938ae53f165b6b3f1 (patch) | |
tree | 19423195330404ccb34456b87fa4e4f93d0f9708 /src/mod_staticfile.c | |
parent | 644725127f029b9e8b5a4b5c0d64867243f788c5 (diff) | |
download | lighttpd-git-010c28949c17f3a846d78e4938ae53f165b6b3f1.tar.gz |
[multiple] prefer (connection *) to (srv *)
convert all log_error_write() to log_error() and pass (log_error_st *)
use con->errh in preference to srv->errh (even though currently same)
avoid passing (server *) when previously used only for logging (errh)
Diffstat (limited to 'src/mod_staticfile.c')
-rw-r--r-- | src/mod_staticfile.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/mod_staticfile.c b/src/mod_staticfile.c index 0e640c44..0f74340f 100644 --- a/src/mod_staticfile.c +++ b/src/mod_staticfile.c @@ -117,6 +117,7 @@ SETDEFAULTS_FUNC(mod_staticfile_set_defaults) { URIHANDLER_FUNC(mod_staticfile_subrequest) { plugin_data *p = p_d; + UNUSED(srv); /* someone else has done a decision for us */ if (con->http_status != 0) return HANDLER_GO_ON; @@ -139,7 +140,8 @@ URIHANDLER_FUNC(mod_staticfile_subrequest) { if (p->conf.disable_pathinfo && !buffer_string_is_empty(con->request.pathinfo)) { if (con->conf.log_request_handling) { - log_error_write(srv, __FILE__, __LINE__, "s", "-- NOT handling file as static file, pathinfo forbidden"); + log_error(con->conf.errh, __FILE__, __LINE__, + "-- NOT handling file as static file, pathinfo forbidden"); } return HANDLER_GO_ON; } @@ -147,18 +149,20 @@ URIHANDLER_FUNC(mod_staticfile_subrequest) { /* ignore certain extensions */ if (p->conf.exclude_ext && array_match_value_suffix(p->conf.exclude_ext, con->physical.path)) { if (con->conf.log_request_handling) { - log_error_write(srv, __FILE__, __LINE__, "s", "-- NOT handling file as static file, extension forbidden"); + log_error(con->conf.errh, __FILE__, __LINE__, + "-- NOT handling file as static file, extension forbidden"); } return HANDLER_GO_ON; } if (con->conf.log_request_handling) { - log_error_write(srv, __FILE__, __LINE__, "s", "-- handling file as static file"); + log_error(con->conf.errh, __FILE__, __LINE__, + "-- handling file as static file"); } if (!p->conf.etags_used) con->conf.etag_flags = 0; - http_response_send_file(srv, con, con->physical.path); + http_response_send_file(con, con->physical.path); return HANDLER_FINISHED; } |