Checkout Tools
  • last updated 4 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Be defensive when the request is missing.

"[mod_dav_fs etag handling] should really honor the FileETag setting".

- It now does.

- Add "Digest" to FileETag directive, allowing a strong ETag to be

generated using a file digest.

- Add ap_make_etag_ex() and ap_set_etag_fd() to allow full control over

ETag generation.

- Add concept of "binary notes" to request_rec, allowing packed bit flags

to be added to a request.

- First binary note - AP_REQUEST_STRONG_ETAG - allows modules to force

the ETag to a strong ETag to comply with RFC requirements, such as those

mandated by various WebDAV extensions.

  1. … 9 more files in changeset.
Fix spelling errors found by codespell. [skip ci]

  1. … 100 more files in changeset.
* Replace apr_psprintf with apr_pstrcat where the format strings only

contain %s to improve efficiency. Leave out error messages as they

are not on a crtical code path and error message become less readable

when taking out the format specifiers.

  1. … 5 more files in changeset.
core, modules: like r1657897 but for core and other modules than mod_proxy.

More uses of ap_map_http_request_error() and AP_FILTER_ERROR so that we never

return an HTTP error status from a handler if some filter generated a response

already.

That is, from a handler, either ap_get_brigade() (an input filter) returned

AP_FILTER_ERROR and we must forward it to ap_die(), or ap_pass_brigade() (an

output filter) failed with any status and we must return AP_FILTER_ERROR in

any case for ap_die() to determine whether a response is needed or not.

  1. … 15 more files in changeset.
Fix indent.
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

path.

* 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.

  1. … 3 more files in changeset.
Followup to r1529559: mod_dav_fs: Fix encoding of hrefs in PROPFIND response.

Previous commit missed encoding the names of the children of the PROPFIND

request when the depth wasn't 0.

* modules/dav/fs/repos.c

(dav_fs_append_uri): New function

(dav_fs_walker): Use dav_fs_append_uri() and adjust length calculations to

use the encoded length.

Fix PR 55397: dav_resource->uri treated as an unparsed uri.

The change made for PR 54611 caused this field to be treated as

unescaped. mod_dav_svn however, provided escaped URIs. Essentially

breaking support for paths with non-URI safe characters in SVN.

Adjust the code so that dav_resource->uri is assumed to be escaped and

adjust mod_dav_fs so that it uses escaped URIs in this field.

* modules/dav/fs/repos.c

(dav_fs_get_resource): Use the unparsed_uri to contruct the resource uri.

* modules/dav/main/mod_dav.c

(dav_xml_escape_uri): Do not uri escape, just handle xml escaping.

(dav_created): Assume that locn if provided is escaped.

(dav_method_copymove, dav_method_bind): Use the unparsed_uri on the request

when calling dav_created() to adjust to locn assuming it is escaped.

* modules/dav/main/mod_dav.h

(dav_resource): Document that uri is escaped.

  1. … 2 more files in changeset.
Change default FileETag to be "size mtime", i.e. remove the inode. Adjust the

etag generation in mod_dav_fs to the new default.

PR 49623.

  1. … 4 more files in changeset.
Cleanup effort in prep for GA push:

Trim trailing whitespace... no func change

  1. … 118 more files in changeset.
refactor to pull setting of Accept-Ranges header into http_protocol.c which

had been copied to other handlers.

  1. … 7 more files in changeset.
Various code cleanup

PR: 51398

Submitted by: Christophe Jaillet <christophe jaillet wanadoo fr>

  1. … 8 more files in changeset.
Fix broken "creationdate" property in mod_dav_fs and

remove remaining uses of sprintf() in the dav modules.

This is a regression in 2.3.7 introduced by r931434.

It calls sizeof() for a function parameter, which only returns the

pointer size, not the size of the char array. Thus the

"creationdate" property got truncated to three characters.

  1. … 3 more files in changeset.
Intel's compiler warns about assigning the non-enum value 0 to the

enumeration apr_finfo_t.filetype, which is done when forgetting

the previously-derived file type

use the appropriate enum value APR_NOFILE instead

Also change comparisons of the field with 0 to use APR_NOFILE instead,

as is the practice of some existing code.

  1. … 14 more files in changeset.
Look ma, portable code.
* Fix compiler warning on 64 bit environments
Create new files with APR_OS_DEFAULT permissions.

Remove errno from dav_error interface. Calls to dav_new_error()

and dav_new_error_tag() must be adjusted to add an apr_status_t parameter.

Reviewed by: jorton

  1. … 10 more files in changeset.
When moving a file over device boundaries and unlinking the source file fails

because it does not exist anymore, don't unlink the destination file.

While it is unclear to me how/when this can happen, at least one user

encountered the problem:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=273476

Fix compiler warning

Fix litmus warning: According to RFC2518, COPY to non-existant collection

should give 409 CONFLICT.

Don't delete the whole file if a PUT with content-range failed.

PR: 42896

  1. … 1 more file in changeset.
Make PUT with DAV_MODE_WRITE_TRUNC create a temporary file first and, when the

transfer has been completed successfully, move it over the old file.

Since this would break inode keyed locking, switch to filename keyed locking

exclusively.

PR: 39815

Submitted by: Paul Querna, Stefan Fritsch

  1. … 2 more files in changeset.
Instead of checking device ids, try rename first and in case of EXDEV,

fallback to copy.

From rename(2) on Linux: Linux permits a file system to be mounted at multiple

points, but rename() does not work across different mount points, even

if the same file system is mounted on both.

fixed dav_hooks_repository_fs struct member order, fixed comments.

Submitted by brian brianfrance.com.

  1. … 1 more file in changeset.
mod_dav: Provide a mechanism to obtain the request_rec and pathname

from the dav_resource.

Submitted by: Jari Urpalainen <jari.urpalainen nokia.com>,

Brian France <brian brianfrance.com>

  1. … 2 more files in changeset.
* modules/dav/fs/repos.c (DAV_FINFO_MASK): Define macro.

(dav_fs_walker): Use DAV_FINFO_MASK when stat'ing the

directory member during the walk.

mod_dav_fs: Retrieve minimal system information about directory

entries when walking a DAV fs, resolving a performance degradation on

Windows.

PR: 45464

  1. … 1 more file in changeset.
* Adjust etag generation to produce identical results on 32-bit and 64-bit

platforms and avoid a regression with conditional PUT's on lock and etag.

Add a warning to the documentation of FileETAG that changes of the ETAG

format can cause conditionals to fail on mod_dav_fs provided backends.

PR: 44152

Submitted by: Michael Clark <michael metaparadigm.com>

Reviewed by: rpluem

  1. … 2 more files in changeset.