breser in httpd

Follow-up to r1666417, update -d to -D in the synopsis docs for rotatelogs.

* STATUS: Revote for r1675533.

* STATUS: Nominate r1677462

* STATUS: Nominate r1677462

* STATUS: Vote for PR 56235 nomination.

mod_dav: Avoid doing the walk on a COPY source for handling preconditions if

there are no preconditions provided.

* modules/dav/main/util.c:

(dav_validate_request): avoid validating locks and ETags when there are

no If headers providing them on a resource we aren't modifying.

* STATUS: Nominate r1675533

* STATUS: Nominate r1675533.

mod_log_config: Fix a bug introduced by r1674261, when using a log provider

the return of ap_default_log_writer was an uninitialized variable.

mod_log_config: Add %M format to output request duration in milliseconds.

Vote for 2 mod_deflate backports for 2.2.x

Fix a typo and add my vote I accidentally left off the PR 56480 nomination.

Nominate the PR 56480 fix for 2.4.x backport.

Nominate the PR 56480 fix for 2.2.x backport.

mod_lua: Remove dead code left over from the old code cache.

The code that used this was commented out in r721594, then removed entirely in

r728497, and finally a commit was made intending to remove the last traces of

the code cache in r1200513, but this initialization lived on anyway.

* modules/lua/mod_lua.c

(create_server_config): Remove unused empty hash and rwlock for hash.

* modules/lua/mod_lua.h

(ap_lua_server_cfg): Remove unneeded hash and rwlock entries.

Found by: Bert Huijben <rhuijben{_at_}>

Fix PR 56480: PROPFIND walker doesn't encode hrefs properly

Reverts r1529559 partially (specifically the dav_xml_escape_uri) bit.

Reverts r1531505 entirely.

* modules/dav/main/mod_dav.c

(dav_xml_escape_uri): Revert the piece of r1529559 that removes the URI

escaping from this function.

* modules/dav/main/props.c

(dav_do_prop_subreq): Escape the URI before doing a sub request with it.

This resolves some properties like getcontenttype from failing to be

returned for files that contain characters that require encoding in their


* modules/dav/main/mod_dav.h

(dav_resource): Note the inconsistency in the documentation.

* modules/dav/fs/repos.c

(dav_fs_get_resource): Don't use the unparsed_uri to set the uri field of

the resource. This is the correct fix for the double encoding in mod_dav_fs

that led to the dav_xml_escape_uri() change and r1531505.

(dav_fs_walker, dav_fs_append_uri): Revert r1531505 changes.

mod_dav: Fix invalid Location header when a resource is created by passing an

absolute URI on the request line.

Using r->unparsed_uri is wrong since it might contain a scheme, hostname and

port. See section 5.1.2 of RFC 2616, an absolute URI is allowed. The

unparsed_uri field is absolutely unparsed. The current code causes the

Location header to end up having the scheme, host and port included twice.

* modules/dav/main/mod_dav.c

(dav_created): Call ap_escape_uri() on r->uri when caller doesn't provide a


Fix our documentation to not show the expression in Require expr as quoted.

Since r1585609 the quoted syntax is ok, but it won't be as efficient so we

probably shouldn't put that syntax in the documentation.

Allow Require expr to work when the expression is quoted.

For example as appears in our documentation:

Require expr "%{TIME_HOUR} -ge 9 && %{TIME_HOUR} -le 17"

PR: 56235

Fix PCRE_DUPNAMES check to find the header file for PCRE when PCRE isn't in

the default includes path.

* STATUS: Nominate r1556428 for backport to 2.4.x

* STATUS: Nominate r1556428 for backport to 2.2.x

SECURITY: CVE-2013-6438 (

mod_dav: Keep track of length of cdata properly when removing leading spaces.

* modules/dav/main/util.c

(dav_xml_get_cdata): reduce len variable when increasing cdata pointer.

Submitted by: Amin Tora <Amin.Tora>

rotatelogs: Remove last constant length error buffer.

* support/rotatelogs.c

(ERRMSGSZ): Remove.

(rotate_status): Remove errbuff member.

(truncate_and_write_error): Accept the error message as an argument.

(doRotate): Shift the pool destruction slightly later and use it to generate

the error message to pass truncate_and_write_error().

(main): In case of write errors create a pool to generate the error message,

since the other pools available may never been freed. Adjust to pass

message directly to truncate_and_write_error().

rotatelogs: Remove another use of a consant length buffer for errors.

* support/rotatelogs.c

(doRotate): Use apr_psprintf() and %pm. Move the destruction of the pool

after we're done with the error message so the error string stays allocated

long enough.

rotatelogs: Use apr_psprintf() with %pm instead of a constant length buffer for


* support/rotatelogs.c

(post_rotate, doRotate): Switch to using apr_psprintf() with %pm.

Suggested by: rpluem

Followup to r1533810: Put the rotatelogs docs in the right place.

* docs/man/rotatelogs.8,

docs/manual/programs/rotatelogs.html.en: Remove changes from r1533810.

* docs/manual/programs/rotatelogs.xml: Adjust docs for new -d option.

Add an option to autocreate directories to rotatelogs.

* support/rotatelogs.c

(rotate_config): Remove const from szLogRoot since we'll be passing it to

apr_filepath_merge. Add create_path member.

(usage, dumpConfig): Update to reflect new -d option.

(doRotate): Add code that knows how to create the directories a log file

is going to go into.

(main): Add the -d option and canonicalize the incoming path with

apr_filepath_merge() so that the code in doRotate can work properly.

* docs/man/rotatelogs.8,

docs/manual/programs/rotatelogs.html.en: Update for -d option.

PR: 46669

Submitted by: Philippe Lantin <plantin>

(which was actually a patch written by myself when I worked there)

Tweaked by: breser (ported to trunk and changed option from -p to -d)

* STATUS: Nominate PR 55397 for 2.2.x

* STATUS: Nominate changes for PR 55397