Checkout Tools
  • last updated 5 hours ago
Constraints: committers
Constraints: files
Constraints: dates
remove unused headers

Fix spelling errors found by codespell. [skip ci]

  1. … 100 more files in changeset.
add SameSite to RewriteRule ... ... [CO]

  1. … 3 more files in changeset.
PR62989: DOCTYPE tags in server-generated HTML.

Submitted By: Andra Farkas <deepbluemistake>, Giovanni Bechis <giovanni>

  1. … 11 more files in changeset.
* modules/mappers/mod_rewrite.c: Enhance trace-level logging to log

line numbers accurately for C99 compilers, and remove odd/awkward

double-parentheses using the rewritelog() macro. For non-C99

compilers do_rewritelog() will now be defined - but as a noop - if

REWRITELOG_DISABLED is defined at compile time.

No functional change at runtime apart from the line numbers being


followup to r1861542: return early from error path

avoid setting a location: header of a non-URL 500 error path

add RedirectRelative directive to allow relative Redirect targets

2616 forbade relative redirect URLs, but 7231 allows them

Early 2.2 maintenance levels did not fix them up, but later 2.2 and all 2.4

fixed them up with ap_construct_url().

Allow opt-in to not fixing up relative URLs with RedirectRelative

  1. … 1 more file in changeset.
style: cmd_rec at the bottom

no functional change

LanguagePriority should be case-insensitive in order to match AddLanguage behavior. PR 39730

Test case added in r1850983

  1. … 1 more file in changeset.
Retsore 2.4.x default behavior modified in r1557580.

Update doc accordingly.

Slightly tweak mod_speling doc

  1. … 1 more file in changeset.
* modules/mappers/mod_negotiation.c (set_language_quality): Remove

redundant branch (warning from Coverity).

When a rewrite to proxy is configured in the server config, a check is made to make sure mod_proxy is active. But the same is not done if a rewrite to proxy is configured in an .htaccess file.

Basically this patch is the block of code from hook_uri2file that does the proxy check, copied to hook_fixup.

Patch provided by Michael Streeter [mstreeter1], slightly modified to use a new APLOGNO

PR 56264

If several directories are given in a UserDir directive, only files in the first existing one are checked. If the file is not found there, the other possible directories are not checked. The doc clearly states that they will be checked one by one, until a match is found or an external redirect is performed.

PR 59636.

While at it, add some debug messages to better understand what is performed.

  1. … 2 more files in changeset.
PR62311: only create the rewritelock when needed

Submitted By: Hank Ibell <hwibell>

Committed By: covener

  1. … 1 more file in changeset.
Fix some typos reported in PR 59998

Most add already been fixed when PR 59990 had been applied on trunk.

Thx klemens

  1. … 15 more files in changeset.
Follow up to r1740928: including NOT_IN_PROXY in NOT_IN_DIR_LOC_FILE is both

incomplete and not backportable, fix it by introducing NOT_IN_DIR_CONTEXT and

restoring NOT_IN_DIR_LOC_FILE to its previous value.

Per ap_check_cmd_context(), NOT_IN_DIR_LOC_FILE actually/really means "not in

any directory context", while the definition itself does not include all the

existing directory contexts (e.g. <Limit>, or <Proxy> before r1740928).

This is a bit of a misnomer, at least, so instead of (ab)using it by adding the

missing contexts (in an incompatible way), let's define NOT_IN_DIR_CONTEXT to

really exclude all directory context (i.e. NOT_IN_DIR_LOC_FILE + NOT_IN_LIMIT +

NOT_IN_PROXY) and use it wherever NOT_IN_DIR_LOC_FILE was used.

This is by itself a major MMN bump (modules not compiled with this commit and

having directives checked against NOT_IN_DIR_LOC_FILE won't be caught the same

way by NOT_IN_DIR_CONTEXT in the new ap_check_cmd_context() code), but with the

below change, 2.4.x should work as before:

- if ((forbidden & NOT_IN_DIR_CONTEXT) == NOT_IN_DIR_CONTEXT) {

+ if ((forbidden & NOT_IN_DIR_LOC_FILE) == NOT_IN_DIR_LOC_FILE) {

if (cmd->path != NULL) {

return apr_pstrcat(cmd->pool, cmd->cmd->name, gt,

- " cannot occur within directory context", NULL);

+ " cannot occur within <Directory/Location/Files/Proxy> "

+ "section", NULL);




  1. … 7 more files in changeset.
core, mod_rewrite: introduce the 'redirect-keeps-vary' note

to allow proper Vary header insertion when

dealing with a RewriteRule in a directory


This change is an attempt to fix a long standing problem,

brought up while working on PR 58231. Our documentation clearly

states the following:

"If a HTTP header is used in a condition this header is added

to the Vary header of the response in case the condition

evaluates to true for the request."

This is currently not true for RewriteCond/Rules working in

a directory context, since when an internal redirect happens

all the outstanding response headers get dropped.

There might be a better solution so I am looking forward to

hear more opinions and comments. My goal for a delicate change

like this one would be to affect the least amount of configurations

possible, without triggering unwanted side effects.

If the solution is good for everybody tests will be written

in the suite asap.

  1. … 2 more files in changeset.
mod_rewrite,core: avoid Vary:Host (part 2)

This is a follow up of r1808746 after a chat

with Yann on dev@:

- the HTTP:Host variable suffers from the same problem

- the strcasecmp should be used to allow case-sensitive


- in mod_rewrite is less cumbersome and more clean to just

make the Host header check in lookup_header, so it will

be automatically picked up by every part of the code

that uses it. It shouldn't be a relevant overhead for


  1. … 2 more files in changeset.
mod_speling/PR 38923: don't embed Referer in link in error page.

  1. … 1 more file in changeset.
mod_rewrite/core: avoid the 'Vary: Host' header

In PR 58231 is was brought up that httpd adds the

Vary: Host header whenever a condition is set to true

in mod_rewrite or in an <If> block.


section seems to disallow this use case:

"The "Vary" header field in a response describes "

"what parts of a request message, "

"aside from the method, Host header field, [...]"

I had a chat with the folks in #traffic-server and

they don't see much point in having a Vary: Host header,

plus it was reported that Varnish doesn't like it very

much (namely it does not cache the response when

it sees the header, links of the report in the PR).

I don't see much value in this behavior of httpd so

I am inclined to remove this response header value,

but I'd be glad to get a more experienced opinion.

  1. … 2 more files in changeset.
Fix negotiation type parsing to be strict about "*", "*/*" and "type/*"


Submitted by: wrowe, Robert Święcki <robert>

Partial reversal of r1800306... note virtual scripts in notes

proxy_fcgi: remove FPM-specific logic

Reverts r1780328, r1780329, and their associated followups, which

incorrectly manipulated SCRIPT_NAME by default. All proxy_fcgi.t

regression tests now pass.

PR: 61202

  1. … 2 more files in changeset.
fix for RewriteOptions processing in r1798938

add RewriteOptions LongURLOptimization

Variable expansion in RewriteCond causes strings to be duplicated

out of r->pool. If the variables are long and many conditions

are evaluated, r->pool can get seriously bloated.

Clear the memory used for variable expansion for each set of conditons

once the set of conditions fails to match.

edit: revised in 1799261

  1. … 2 more files in changeset.
Save a few bytes in the request pool.
Adjust as needed
  1. … 1 more file in changeset.
PR60009: RewriteRule local prefix checking update

*) mod_rewrite: When a substitution is a fully qualified URL, and the

scheme/host/port matches the current virtual host, stop interpreting the

path component as a local path just because the first component of the

path exists in the filesystem. Adds RewriteOption "LegacyPrefixDocRoot"

to revert to previous behavior. PR60009.

Submitted By: Hank Ibell <hwibell>

  1. … 2 more files in changeset.
short-circuit some kinds of looping in RewriteRule.


Submitted By: Jeff Wheelouse <apache>

Committed By: covener

  1. … 1 more file in changeset.
Fix spelling in comments and text files.

No functional change.

PR 59990

  1. … 67 more files in changeset.