Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:non7top
mod_xsendfile-ngx
nginx.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File nginx.patch of Package mod_xsendfile-ngx
diff --git a/mod_xsendfile.c b/mod_xsendfile.c index a81479c..969cffe 100644 --- a/mod_xsendfile.c +++ b/mod_xsendfile.c @@ -54,7 +54,7 @@ #include "util_filter.h" #include "http_protocol.h" /* ap_hook_insert_error_filter */ -#define AP_XSENDFILE_HEADER "X-SENDFILE" +#define AP_XSENDFILE_HEADER "X-Accel-Redirect" module AP_MODULE_DECLARE_DATA xsendfile_module; @@ -333,7 +333,16 @@ static apr_status_t ap_xsendfile_output_filter(ap_filter_t *f, apr_bucket_brigad apr_table_unset(r->headers_out, "Content-Encoding"); apr_table_unset(r->err_headers_out, "Content-Encoding"); - rv = ap_xsendfile_get_filepath(r, conf, file, &translated); + /* make file relative */ + char *docroot = ap_document_root(r); + + apr_pool_t *mp; + apr_pool_create(&mp, NULL); + const char *cat_str = apr_pstrcat(mp, docroot, file, NULL); + + rv = ap_xsendfile_get_filepath(r, conf, cat_str, &translated); + apr_pool_destroy(mp); + if (rv != OK) { ap_log_rerror( APLOG_MARK,
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor