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.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1602338 13f79535-47bb-0310-9956-ffa450edef68
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
location.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1592655 13f79535-47bb-0310-9956-ffa450edef68
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 neustar.biz>
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1556428 13f79535-47bb-0310-9956-ffa450edef68
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.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1531505 13f79535-47bb-0310-9956-ffa450edef68
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.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1529559 13f79535-47bb-0310-9956-ffa450edef68
Makes mod_dav no longer require that the lock token be provided when the
source of a COPY is locked. The prior behavior was in violating of
RFC 4918 which says that the lock token is only required on resources
that may be modified by the method.
* modules/dav/main/mod_dav.h
(DAV_VALIDATE_NO_MODIFY): New flag to be passed to dav_validate_* functions.
* modules/dav/main/mod_dav.c
(dav_method_copymove): Use the new flag when calling dav_validate_request()
on the COPY source.
* modules/dav/main/util.c
(dav_validate_resource_state): Use the flag to decide to ignore if the lock
token is not provided.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1528718 13f79535-47bb-0310-9956-ffa450edef68
In short: do not validate conditions of a COPY source's parent since
it is not modified during the operation.
* modules/dav/main/mod_dav.c:
(dav_method_copymove): adjust params to dav_validate_request()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1506714 13f79535-47bb-0310-9956-ffa450edef68
mod_dav: Sending a MERGE request against a URI handled by mod_dav_svn with
the source href (sent as part of the request body as XML) pointing to a
URI that is not configured for DAV will trigger a segfault.
Submitted by: Ben Reser <ben reser.org>
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1485668 13f79535-47bb-0310-9956-ffa450edef68
to the output filters, which is bogus in the proxy case. Create a
clean mapping from APR codes to HTTP status codes, and use it where
needed.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1482522 13f79535-47bb-0310-9956-ffa450edef68
property on a resource for which there is no dead property in the same
namespace httpd segfaults. PR 52559
Submitted by Diego Santa Cruz <diego.santaCruz spinetix.com>
Tested by William Lewis <wiml omnigroup com>
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1476642 13f79535-47bb-0310-9956-ffa450edef68
we compare unencoded paths. PR 53910
Patch submitted by Timothy Wood <tjw omnigroup com>
Tested by William Lewis <wiml omnigroup com>
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1470940 13f79535-47bb-0310-9956-ffa450edef68
incomplete writes.
Add comments in some places where error handling/logging is missing.
PR: 53131.
Submitted by: Nicolas Viennot <apache viennot biz>, Stefan Fritsch
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1331110 13f79535-47bb-0310-9956-ffa450edef68
are allocated from the request pool and not modified later on.
Submitted by: Christophe JAILLET <christophe jaillet wanadoo fr>
PR: 51358
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1135084 13f79535-47bb-0310-9956-ffa450edef68
remove some unused variables and dead assignments, reduce the scope of some
variables, add some parens to improve readability
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1103459 13f79535-47bb-0310-9956-ffa450edef68