Browse Source

[core] http_response_send_file() takes const path

master
Glenn Strauss 5 months ago
parent
commit
3909e27f39
  1. 2
      src/http-header-glue.c
  2. 2
      src/response.h

2
src/http-header-glue.c

@ -308,7 +308,7 @@ handler_t http_response_reqbody_read_error (request_st * const r, int http_statu
}
void http_response_send_file (request_st * const r, buffer * const path, stat_cache_entry *sce) {
void http_response_send_file (request_st * const r, const buffer * const path, stat_cache_entry *sce) {
if (NULL == sce
|| (sce->fd < 0 && __builtin_expect( (0 != sce->st.st_size), 0))) {
sce = stat_cache_get_entry_open(path, r->conf.follow_symlink);

2
src/response.h

@ -52,7 +52,7 @@ const buffer * http_response_set_last_modified(request_st *r, unix_time64_t lmti
int http_response_handle_cachable(request_st *r, const buffer *lmod, unix_time64_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, struct stat_cache_entry *sce);
void http_response_send_file (request_st *r, const 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);

Loading…
Cancel
Save