Lines 152-157
Link Here
|
152 |
#define RULEFLAG_NOSUB 1<<12 |
152 |
#define RULEFLAG_NOSUB 1<<12 |
153 |
#define RULEFLAG_STATUS 1<<13 |
153 |
#define RULEFLAG_STATUS 1<<13 |
154 |
#define RULEFLAG_ESCAPEBACKREF 1<<14 |
154 |
#define RULEFLAG_ESCAPEBACKREF 1<<14 |
|
|
155 |
#define RULEFLAG_ITERATE 1<<15 |
155 |
|
156 |
|
156 |
/* return code of the rewrite rule |
157 |
/* return code of the rewrite rule |
157 |
* the result may be escaped - or not |
158 |
* the result may be escaped - or not |
Lines 3384-3389
Link Here
|
3384 |
} |
3385 |
} |
3385 |
break; |
3386 |
break; |
3386 |
|
3387 |
|
|
|
3388 |
case 'i': |
3389 |
case 'I': |
3390 |
if (!*key || !strcasecmp(key, "terate")) { /* iterate */ |
3391 |
cfg->flags |= RULEFLAG_ITERATE; |
3392 |
} |
3393 |
else { |
3394 |
++error; |
3395 |
} |
3396 |
break; |
3397 |
|
3387 |
case 'l': |
3398 |
case 'l': |
3388 |
case 'L': |
3399 |
case 'L': |
3389 |
if (!*key || !strcasecmp(key, "ast")) { /* last */ |
3400 |
if (!*key || !strcasecmp(key, "ast")) { /* last */ |
Lines 4059-4068
Link Here
|
4059 |
rc = apply_rewrite_rule(p, ctx); |
4070 |
rc = apply_rewrite_rule(p, ctx); |
4060 |
|
4071 |
|
4061 |
if (rc) { |
4072 |
if (rc) { |
4062 |
/* Regardless of what we do next, we've found a match. Check to see |
4073 |
/* Regardless of what we do next, we've found a match. |
4063 |
* if any of the request header fields were involved, and add them |
4074 |
* Iterate over the rule as long as it matches, |
4064 |
* to the Vary field of the response. |
4075 |
* if the iteration flag has been set. |
|
|
4076 |
* Don't detroy return code from first match. |
4065 |
*/ |
4077 |
*/ |
|
|
4078 |
if (p->flags & RULEFLAG_ITERATE) { |
4079 |
while(apply_rewrite_rule(p, ctx)) { |
4080 |
} |
4081 |
} |
4082 |
|
4083 |
/* |
4084 |
* Check to see if any of the request header fields were |
4085 |
* involved, and add them to the Vary field of the response. |
4086 |
*/ |
4066 |
if (ctx->vary) { |
4087 |
if (ctx->vary) { |
4067 |
apr_table_merge(r->headers_out, "Vary", ctx->vary); |
4088 |
apr_table_merge(r->headers_out, "Vary", ctx->vary); |
4068 |
} |
4089 |
} |