-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Description
Please add an option for a compatability mod with nginx. Two changes are neccesary:
- Different header
-#define AP_XSENDFILE_HEADER "X-SENDFILE"
+#define AP_XSENDFILE_HEADER "X-Accel-Redirect" - Files are relative to docroot
- 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);
This patch may be ugly, but seems to be working fine. Would be great if this be controllable by the config directive.
Metadata
Metadata
Assignees
Labels
No labels