Checkout Tools
  • last updated 1 hour ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
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

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.
mod_alias: follow up to r1686853.

Factorize code (no functional change).

mod_alias: follow up to r1653941.

Limit Redirect expressions to directory (Location) context

and redirect statuses (implicit or explicit).

  1. … 1 more file in changeset.
mod_alias: follow up to r1653941.

Fill empty APLOGNO().

  1. … 1 more file in changeset.
Use unsigned bit fields.

mod_alias: Introduce expression parser support for Alias, ScriptAlias

and Redirect.

  1. … 3 more files in changeset.
stop setting context info for AliasMatch. These concepts do not really map

well/reliably to AliasMatch.

  1. … 1 more file in changeset.
Fix segfault in mod_alias introduced in r1132494.

AliasMatch does not append unmatched parts of the

original URI to the new URI. So no need to subtract

anything from the new URI length.

The existing code crashed when using

"AliasMatch / /some/thing" and sending a request

with a long URI.

Add lots of unique tags to error log messages

  1. … 172 more files in changeset.
More error checking for ap_pregsub

  1. … 1 more file in changeset.
- Introduce concept of context prefix (which is an URL prefix)

and context document root (which is the file system directory that

this URL prefix is mapped to). This generalization of the document

root makes it easier for scripts to create self-referential URLs and

to find their files.

- Expose CONTEXT_DOCUMENT_ROOT and CONTEXT_PREFIX as envvars, in mod_rewrite,

and in ap_expr.

- Make mod_alias and mod_userdir set the context information.

- Allow to override the document root on a per-request basis. This allows

mass vhosting modules to set DOCUMENT_ROOT correctly.

- Make mod_vhost_alias set the per-request document root

PR: 26052, 46198, 49705

Remaining tasks:

- Use the context document root & prefix in mod_rewrite to make RewriteBase

unneccessary in many cases. Do this without breaking compatibility.

- Write docs.

  1. … 10 more files in changeset.
avoid useless call to apr_pstrdup

In comments: s@ XX @ XXX: @ so they can actually be found seen.

  1. … 3 more files in changeset.
Rename some variables for better readability:

p -> alias (not a pool)

r -> real (not a request_rec)

f -> fake

Use the new APLOG_USE_MODULE/AP_DECLARE_MODULE macros everywhere to take

advantage of per-module loglevels

  1. … 169 more files in changeset.
mod_alias: Ensure Redirect issues a valid URL

PR 44020

Patch by Håkon Stordahl

  1. … 1 more file in changeset.
Simplify... handle this below, even though it's

after some possible expensive regex

typo

More adjustment for Redirect argument checking...

* Some custom defined response codes also do not require 3 arguments (all that

are not redirects).

Fix error with arg counting

  1. … 1 more file in changeset.
mod_alias: Enforce sanity in args to Redirect

PR 44729

  1. … 1 more file in changeset.
PR#35314: Enable path components in Redirect

update license header text
  1. … 316 more files in changeset.
Update the copyright year in all .c, .h and .xml files

  1. … 497 more files in changeset.
No functional Change: Removing trailing whitespace. This also

means that "blank" lines consisting of just spaces or

tabs are now really blank lines

  1. … 180 more files in changeset.
Move the POSIX reg* implementations into the ap_* namespace;

internalise the ap_reg*<->PCRE wrapper:

* configure.in: Add srclib/pcre to the include path.

* include/ap_regex.h: Renamed from include/pcreposix.h. Prefix all

constants with AP_; prefix all functions and types with ap_. Define

AP_DECLARE to nothing if necessary. Remove regcomp error codes.

* include/httpd.h: Include ap_regex.h not pcreposix.h.

(ap_pregcomp, ap_regexec, ap_regfree): s/regex_t/ap_regex_t/.

(ap_regexec, ap_regerror): Prototypes moved to ap_regex.h.

* server/util.c (regex_cleanup, ap_pregcomp, ap_pregsub, ap_pregfree):

Adjust for ap_ prefixed types. (ap_regexec, ap_regerror): Removed.

* server/Makefile.in: Build util_pcre.c.

* server/util_pcre.c: Copied from srclib/pcre/pcreposix.c; remove use

of PCRE-internals to do error mapping; rename types to add AP_/ap_

prefixes as above. Use APR includes. (ap_regerror): Use apr_snprintf.

* srclib/pcre/Makefile.in: Don't build pcreposix.c into libpcre.la.

* modules/*: Update to use new type and constant names.

PR: 27750 (part one)

Submitted by: Andres Salomon <dilinger voxel.net>, Joe Orton

  1. … 25 more files in changeset.