APACHE 2.0 STATUS: -*-text-*-
-Last modified at [$Date: 2004/08/26 21:18:37 $]
+Last modified at [$Date: 2004/08/26 21:53:23 $]
Release:
http://cvs.apache.org/viewcvs.cgi/httpd-2.0/modules/loggers/mod_log_config.c?r1=1.118&r2=1.119
+1: trawick, nd, jerenkrantz
- *) (re-)add support for RewriteRules in <Proxy> containers. PR 27985
- modules/mappers/mod_rewrite.c: r1.254
- +1: nd, trawick, stoddard
-
*) mod_include: remove "recursive-include" check, it's no longer
necessary and forbids legal actions.
modules/filters/mod_include.c: r1.296
int rulestatus;
int n;
char *ofilename;
+ int is_proxyreq;
dconf = (rewrite_perdir_conf *)ap_get_module_config(r->per_dir_config,
&rewrite_module);
return DECLINED;
}
+ /*
+ * Proxy request?
+ */
+ is_proxyreq = ( r->proxyreq && r->filename
+ && !strncmp(r->filename, "proxy:", 6));
+
/*
* .htaccess file is called before really entering the directory, i.e.:
* URL: http://localhost/foo and .htaccess is located in foo directory
* Ignore such attempts, since they may lead to undefined behaviour.
*/
- l = strlen(dconf->directory) - 1;
- if (r->filename && strlen(r->filename) == l &&
- (dconf->directory)[l] == '/' &&
- !strncmp(r->filename, dconf->directory, l)) {
- return DECLINED;
+ if (is_proxyreq) {
+ l = strlen(dconf->directory) - 1;
+ if (r->filename && strlen(r->filename) == l &&
+ (dconf->directory)[l] == '/' &&
+ !strncmp(r->filename, dconf->directory, l)) {
+ return DECLINED;
+ }
}
/*
rewritecond_entry *c;
int i;
int rc;
+ int is_proxyreq = 0;
/*
* Initialisation
* threatment in the logfile.
*/
if (perdir) {
- if ( strlen(uri) >= strlen(perdir)
+ /*
+ * Proxy request?
+ */
+ is_proxyreq = ( r->proxyreq && r->filename
+ && !strncmp(r->filename, "proxy:", 6));
+
+ if ( !is_proxyreq && strlen(uri) >= strlen(perdir)
&& strncmp(uri, perdir, strlen(perdir)) == 0) {
rewritelog(r, 3, "[per-dir %s] strip per-dir prefix: %s -> %s",
perdir, uri, uri+strlen(perdir));
* location, i.e. if it's not an absolute URL (!) path nor
* a fully qualified URL scheme.
*/
- if (perdir && *r->filename != '/' && !is_absolute_uri(r->filename)) {
+ if ( perdir && !is_proxyreq && *r->filename != '/'
+ && !is_absolute_uri(r->filename)) {
rewritelog(r, 3, "[per-dir %s] add per-dir prefix: %s -> %s%s",
perdir, r->filename, perdir, r->filename);
r->filename = apr_pstrcat(r->pool, perdir, r->filename, NULL);