Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
From 199beb26a64a12cf02a76e28654c2a939771408d Mon Sep 17 00:00:00 2001
From: Lars Kellogg-Stedman <lars@oddbit.com>
Date: Fri, 28 Oct 2011 15:33:22 -0400
Subject: [PATCH] prefer local TransformSet directive to parent
---
src/mod_transform.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/mod_transform.c b/src/mod_transform.c
index a7feddc..6499918 100644
--- a/src/mod_transform.c
+++ b/src/mod_transform.c
@@ -297,7 +297,7 @@ static void *transform_merge_dir_config(apr_pool_t * p, void *basev, void *addv)
dir_cfg *merge = addv;
dir_cfg *to = apr_palloc(p, sizeof(dir_cfg));
- to->xslt = (merge->xslt != 0) ? merge->xslt : from->xslt;
+ to->xslt = (from->xslt != 0) ? from->xslt : merge->xslt;
/* This code comes from mod_autoindex's IndexOptions */
if (merge->opts & NO_OPTIONS) {
--
1.7.6
@larsks

This comment has been minimized.

Copy link
Owner Author

@larsks larsks commented Oct 28, 2011

This patch was inspired by my question on StackOverflow regarding the precedence of multiple TransformSet directives in an Apache configuration. The original code will prefer TransformSet directives set on higher-level directories (e.g., "/" vs "/blog/"). This patch reverses that behavior so that a TransformSet on a subordinate directory will take precedence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.