1
0
mirror of https://github.com/apache/httpd.git synced 2026-01-13 21:42:17 +03:00
Commit Graph

240 Commits

Author SHA1 Message Date
Christophe Jaillet
77a1c29551 Fix indent.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1638159 13f79535-47bb-0310-9956-ffa450edef68
2014-11-11 15:20:49 +00:00
Ben Reser
3bda0de20f 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.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1602338 13f79535-47bb-0310-9956-ffa450edef68
2014-06-13 08:34:05 +00:00
Christophe Jaillet
58af80a630 As in 'dav_generic_do_refresh', add missing break in 'dav_fs_do_refresh' to avoid useless computation.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1556911 13f79535-47bb-0310-9956-ffa450edef68
2014-01-09 18:44:50 +00:00
Jeff Trawick
30f8aa6460 more apr_file_write_full() simplification (like r1542413)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1542416 13f79535-47bb-0310-9956-ffa450edef68
2013-11-15 22:03:16 +00:00
Ben Reser
31a3eab6d7 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.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1531505 13f79535-47bb-0310-9956-ffa450edef68
2013-10-12 06:13:20 +00:00
Ben Reser
4de0b69f7f 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.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1529559 13f79535-47bb-0310-9956-ffa450edef68
2013-10-06 01:08:51 +00:00
Graham Leggett
206e02d428 mod_dav: Do not fail PROPPATCH when prop namespace is not known. 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@1476644 13f79535-47bb-0310-9956-ffa450edef68
2013-04-27 17:44:36 +00:00
Graham Leggett
24356db0c5 mod_dav: When a PROPPATCH attempts to remove a non-existent dead
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
2013-04-27 17:38:45 +00:00
Guenter Knauf
7814748ab3 NetWare build tweaks.
Make more use of internal makefile macros;
axed now obsolete include paths.
Submitted by: normw gknw net.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1371177 13f79535-47bb-0310-9956-ffa450edef68
2012-08-09 12:11:09 +00:00
Stefan Fritsch
fe4f92509b Replace use of apr_file_write() with apr_file_write_full() to prevent
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
2012-04-26 21:44:51 +00:00
Stefan Fritsch
21cc07a470 Make APACHE_MODULE() accept an optional prerequisite module for configure.
Introduce the following configure time dependencies:
  mod_proxy_* (except proxy_html) require mod_proxy
  mod_dav_* require mod_dav
  mod_session_* require mod_session


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1234180 13f79535-47bb-0310-9956-ffa450edef68
2012-01-20 22:14:31 +00:00
Stefan Fritsch
92e366007c Add lots of unique tags to error log messages
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1209766 13f79535-47bb-0310-9956-ffa450edef68
2011-12-02 23:02:04 +00:00
Stefan Fritsch
ccc76d4e43 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.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1199086 13f79535-47bb-0310-9956-ffa450edef68
2011-11-08 03:06:08 +00:00
Jim Jagielski
427c85bd23 Cleanup effort in prep for GA push:
Trim trailing whitespace... no func change



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1174751 13f79535-47bb-0310-9956-ffa450edef68
2011-09-23 13:39:32 +00:00
Eric Covener
c45e14b246 refactor to pull setting of Accept-Ranges header into http_protocol.c which
had been copied to other handlers.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1166663 13f79535-47bb-0310-9956-ffa450edef68
2011-09-08 12:56:08 +00:00
Stefan Fritsch
51692222f6 Various code cleanup
PR: 51398
Submitted by: Christophe Jaillet <christophe jaillet wanadoo fr>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1138627 13f79535-47bb-0310-9956-ffa450edef68
2011-06-22 20:45:34 +00:00
Stefan Fritsch
c67e7d5dd0 Log the proper module name on errors
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1133163 13f79535-47bb-0310-9956-ffa450edef68
2011-06-07 20:58:45 +00:00
Stefan Fritsch
afe7630907 Log a more obvious message if apr cannot load its dbm shared library.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1133158 13f79535-47bb-0310-9956-ffa450edef68
2011-06-07 20:55:56 +00:00
Stefan Fritsch
c405eb5299 Don't return an undefined value if opening of a read-only database fails.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1133152 13f79535-47bb-0310-9956-ffa450edef68
2011-06-07 20:40:21 +00:00
Stefan Fritsch
51226bdcca Fix various "variable 'x' set but not used" warnings.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1125877 13f79535-47bb-0310-9956-ffa450edef68
2011-05-22 07:42:18 +00:00
Guenter Knauf
7c1e9bf7c9 More NetWare build fixes.
Sorted some makefile dependencies; fixed DAV makefiles.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1083478 13f79535-47bb-0310-9956-ffa450edef68
2011-03-20 15:56:39 +00:00
Guenter Knauf
888ec80125 Use a var INSTALLBASE to simplify NetWare installation rules.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1082821 13f79535-47bb-0310-9956-ffa450edef68
2011-03-18 04:56:06 +00:00
Guenter Knauf
bab978c56e Use var for prelude so its possible to change it at one place.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1082811 13f79535-47bb-0310-9956-ffa450edef68
2011-03-18 03:09:27 +00:00
Guenter Knauf
2dc89e951b NetWare build overhaul in order to compile on Linux.
Some more fixes ...


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1079614 13f79535-47bb-0310-9956-ffa450edef68
2011-03-09 00:19:31 +00:00
Guenter Knauf
e8a8becc0f NetWare build overhaul in order to compile on Linux.
Removed absolute paths to imp files.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1079487 13f79535-47bb-0310-9956-ffa450edef68
2011-03-08 18:59:02 +00:00
Guenter Knauf
46b7e1d210 NetWare build overhaul in order to compile on Linux.
Take 1.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1079407 13f79535-47bb-0310-9956-ffa450edef68
2011-03-08 16:04:40 +00:00
Daniel Earl Poirier
4c477008d4 Add to modules' help text (displayed by ./configure -h) more
information that will be useful in deciding whether to enable
them or not.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1029814 13f79535-47bb-0310-9956-ffa450edef68
2010-11-01 20:02:51 +00:00
Rainer Jung
6e66831b4a 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.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@987484 13f79535-47bb-0310-9956-ffa450edef68
2010-08-20 12:55:42 +00:00
Jeff Trawick
0ce133f8a8 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.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@983065 13f79535-47bb-0310-9956-ffa450edef68
2010-08-06 17:36:52 +00:00
Guenter Knauf
5e8988e256 Removed obsolete include paths from NetWare makefiles.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@966904 13f79535-47bb-0310-9956-ffa450edef68
2010-07-22 23:38:58 +00:00
Stefan Fritsch
ebb62867fb Use the new APLOG_USE_MODULE/AP_DECLARE_MODULE macros everywhere to take
advantage of per-module loglevels


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@951895 13f79535-47bb-0310-9956-ffa450edef68
2010-06-06 16:59:50 +00:00
William A. Rowe Jr
d887351498 Look ma, portable code.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@931434 13f79535-47bb-0310-9956-ffa450edef68
2010-04-07 04:40:36 +00:00
Ruediger Pluem
68603b126b * Fix compiler warning on 64 bit environments
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@929022 13f79535-47bb-0310-9956-ffa450edef68
2010-03-30 07:12:58 +00:00
Stefan Fritsch
592cb37b2a Create new files with APR_OS_DEFAULT permissions.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@928403 13f79535-47bb-0310-9956-ffa450edef68
2010-03-28 14:19:49 +00:00
Guenter Knauf
03a066c10a more NetWare makefile cleanups.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@885781 13f79535-47bb-0310-9956-ffa450edef68
2009-12-01 15:00:11 +00:00
Jeff Trawick
540ceccf45 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


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@882274 13f79535-47bb-0310-9956-ffa450edef68
2009-11-19 20:09:27 +00:00
Stefan Fritsch
d06145f959 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


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@834697 13f79535-47bb-0310-9956-ffa450edef68
2009-11-10 22:13:50 +00:00
Stefan Fritsch
aa875cfd7f Revert removal of the key_type byte in the lock key. There is no need to break
the format on systems without inodes.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@834533 13f79535-47bb-0310-9956-ffa450edef68
2009-11-10 16:32:57 +00:00
Stefan Fritsch
2cefaf3c32 Fix compiler warning
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@834079 13f79535-47bb-0310-9956-ffa450edef68
2009-11-09 14:27:45 +00:00
Stefan Fritsch
69cae4bd3f Fix litmus warning: According to RFC2518, COPY to non-existant collection
should give 409 CONFLICT.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@834073 13f79535-47bb-0310-9956-ffa450edef68
2009-11-09 14:10:31 +00:00
Stefan Fritsch
539b5f666c Don't delete the whole file if a PUT with content-range failed.
PR: 42896


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@834062 13f79535-47bb-0310-9956-ffa450edef68
2009-11-09 13:50:21 +00:00
Stefan Fritsch
071c3e84f9 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


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@834049 13f79535-47bb-0310-9956-ffa450edef68
2009-11-09 13:14:07 +00:00
Stefan Fritsch
734abfb1fa 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.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@834019 13f79535-47bb-0310-9956-ffa450edef68
2009-11-09 11:17:01 +00:00
Guenter Knauf
a7c17df337 fixed dav_hooks_repository_fs struct member order, fixed comments.
Submitted by brian brianfrance.com.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@830284 13f79535-47bb-0310-9956-ffa450edef68
2009-10-27 18:36:26 +00:00
Graham Leggett
9a107e738e 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>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@823703 13f79535-47bb-0310-9956-ffa450edef68
2009-10-09 21:41:31 +00:00
Brian Havard
60fbe11de1 Bring back OS/2 support.
Reverses r758929 with a little bit of conflict resolution.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@807930 13f79535-47bb-0310-9956-ffa450edef68
2009-08-26 08:56:13 +00:00
Jeff Trawick
ee32468a33 remove OS/2 platform support
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@758929 13f79535-47bb-0310-9956-ffa450edef68
2009-03-26 23:47:52 +00:00
Joe Orton
1cf4c24246 * 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.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@685112 13f79535-47bb-0310-9956-ffa450edef68
2008-08-12 10:46:48 +00:00
Jeff Trawick
484b633aad mod_dav_fs: Retrieve minimal system information about directory
entries when walking a DAV fs, resolving a performance degradation on
Windows.

PR: 45464


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@683626 13f79535-47bb-0310-9956-ffa450edef68
2008-08-07 15:12:00 +00:00
Ruediger Pluem
0260bcb6ba * 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


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@607437 13f79535-47bb-0310-9956-ffa450edef68
2007-12-29 16:06:19 +00:00