summaryrefslogtreecommitdiff
path: root/modules/dav
Commit message (Collapse)AuthorAgeFilesLines
* dav_fs_cmds is declared twice in the file... VS 2022 complains about it.Jean-Frederic Clere2023-05-051-2/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1909628 13f79535-47bb-0310-9956-ffa450edef68
* * Fix 'warning: suggest parentheses around assignment used as truth value'Ruediger Pluem2023-03-071-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1908152 13f79535-47bb-0310-9956-ffa450edef68
* Use ap_parse_strict_length() to parse client-supplied Content-Lengthmanu2023-03-071-6/+14
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1908144 13f79535-47bb-0310-9956-ffa450edef68
* Remove usuless double check of APR_FINFO_NAME neing setmanu2023-03-071-6/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1908143 13f79535-47bb-0310-9956-ffa450edef68
* Add RFC4331 quotas for mod_dav_fsmanu2023-03-021-9/+6
| | | | | | | Fix warnings git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1907989 13f79535-47bb-0310-9956-ffa450edef68
* Add RFC4331 quotas for mod_dav_fsmanu2023-03-021-0/+359
| | | | | | | Address forgotten svn add in previous commit git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1907984 13f79535-47bb-0310-9956-ffa450edef68
* Add RFC4331 quotas for mod_dav_fsmanu2023-03-026-8/+233
| | | | | | | | | | | This is enabled by a new directive: DavQuota (Off|None|#bytes) Off (default): feature disabled None: no quota enforced, but used and available bytes are reported #bytes: an numerical value in bytes as the quota to enforce git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1907974 13f79535-47bb-0310-9956-ffa450edef68
* Fix NULL derefernece for anonymous usersmanu2023-03-021-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1907973 13f79535-47bb-0310-9956-ffa450edef68
* Fix signedness formatting check in mod_dav code.Stefan Eissing2023-02-161-4/+4
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1907695 13f79535-47bb-0310-9956-ffa450edef68
* Fix warning for NULL pointermanu2023-02-151-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1907683 13f79535-47bb-0310-9956-ffa450edef68
* Fix warningsmanu2023-02-151-15/+4
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1907680 13f79535-47bb-0310-9956-ffa450edef68
* Turn msext_opts into a bitfieldmanu2023-02-141-21/+19
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1907649 13f79535-47bb-0310-9956-ffa450edef68
* Add MS-WDV supportmanu2023-02-137-4/+932
| | | | | | | | | | | | | | | MS-WDV specification: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-wdv The changes introduces the DAVMSext directive, which is used to enable MS-WDV: DAVMSext +WDV dav_get_timeout_string() is introduced as a variant of dav_get_timeout(). The former parses a string, the later parse the Timeout HTTP header. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1907608 13f79535-47bb-0310-9956-ffa450edef68
* * modules/dav/main/util.c (dav_process_if_header): Fix errorJoe Orton2023-01-091-1/+7
| | | | | | | path for "Not" prefix parsing. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1906487 13f79535-47bb-0310-9956-ffa450edef68
* Open the lock database read-only when possiblemanu2022-11-111-4/+2
| | | | | | | | | | | The goal is to reduce lock contention, since a read access only requires a shared lock. The improvement should not be significant since for now we open and close the lock database on each HTTP request. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1905229 13f79535-47bb-0310-9956-ffa450edef68
* Initialize allow_lockdiscovery as unsetmanu2022-11-091-2/+0
| | | | | | | | | | | | | | | Removing the initialization means it is set as 0 by apr_pcalloc(), and 0 is DAV_ENABLED_UNSET That is required to inherit configuration in dav_merge_dir_config() as pointed out by rpluem@ We only check for allow_lockdiscovery against DAV_ENABLED_OFF, hence DAV_ENABLED_UNSET is equivalent to DAV_ENABLED_ON, which is required for backware compatibility sake. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1905206 13f79535-47bb-0310-9956-ffa450edef68
* Turn DavLockDiscovery into a flagmanu2022-11-091-31/+14
| | | | | | | | | | As requested on dev@httpd.apache.org, turn DavLockDiscovery into a Flag. Expressions can still be used by enclosing the directive by <If "expr">...</If> git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1905170 13f79535-47bb-0310-9956-ffa450edef68
* mod_dav: Follow up to r1904638: Fix duplicated APLOGNO.Yann Ylavic2022-10-171-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1904662 13f79535-47bb-0310-9956-ffa450edef68
* mod_dav: Allow to disable lock discovery via an DAVLockDiscovery expression.Yann Ylavic2022-10-173-8/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | mod_dav-fs scales badly when a few clients run PROPFIND requests to discover directory content. Each PROPFIND involves lockdiscovery, which in turn waits for a locked access to the file containing the lock database. Performances quickly drop because of lock contention on this file. Add a DAVLockDiscovery configuration directive that allows lockdiscovery to be disabled. Its argument is an Apache expression so that flexible configuration are possible (per-request). When lock discovery is disabled, an empty lockdiscovery property is returned on POPRFIND methods, just like if no lock was set on the object. That should cause no regression, since a client cannot rely on lockdiscovery to decide when a file should be accessed, the LOCK methood must be used. If DAVLockDiscovery is not specified, the behavior is unchanged. PR 66313. Submitted by: Emmanuel Dreyfus <manu netbsd.org> Reviewed by: ylavic git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1904638 13f79535-47bb-0310-9956-ffa450edef68
* dav_get_liveprop_info() returns a long not an int.Christophe Jaillet2022-05-041-3/+3
| | | | | | | | Update the type of global_ns accordingly and update the format specifier when this variable is used in printf like functions. This also aligns code with dav_core_insert_prop() in modules/dav/main/std_liveprop.c git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1900559 13f79535-47bb-0310-9956-ffa450edef68
* * Fix a typoRuediger Pluem2022-02-091-1/+1
| | | | | | | | Submitted by: Jens Schleusener <Jens.Schleusener@fossies.org> git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1897890 13f79535-47bb-0310-9956-ffa450edef68
* Revert 1897156.Graham Leggett2022-01-201-93/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1897273 13f79535-47bb-0310-9956-ffa450edef68
* mod_dav: Follow up to r1897156: Fix warning.Yann Ylavic2022-01-181-1/+1
| | | | | | | | | | | | | | | | | | In file included from mod_dav.c:51: mod_dav.c: In function ‘uripath_is_canonical’: mod_dav.c:774:38: error: passing argument 1 of ‘ap_strchr’ discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 774 | dot_pos = strchr(dot_pos + 1, '.')) { | ~~~~~~~~^~~ /home/travis/build/apache/httpd/include/httpd.h:2469:34: note: in definition of macro ‘strchr’ 2469 | # define strchr(s, c) ap_strchr(s,c) | ^ /home/travis/build/apache/httpd/include/httpd.h:2457:36: note: expected ‘char *’ but argument is of type ‘const char *’ 2457 | AP_DECLARE(char *) ap_strchr(char *s, int c); | ~~~~~~^ git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1897183 13f79535-47bb-0310-9956-ffa450edef68
* * Allocate the dav_liveprop_elem structure only once in the lifetime of theRuediger Pluem2022-01-181-2/+8
| | | | | | | | resource->pool and reuse it to avoid unnecessary huge memory allocations during collection walks. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1897182 13f79535-47bb-0310-9956-ffa450edef68
* core: Allow an optional expression to be specified for an effectiveGraham Leggett2022-01-171-2/+93
| | | | | | | | | path in the DirectoryMatch and LocationMatch directives. This allows modules like mod_dav to map URLs to URL spaces or to directories on the filesystem. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1897156 13f79535-47bb-0310-9956-ffa450edef68
* Clarify where the element can be obtained.Graham Leggett2021-09-261-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1893644 13f79535-47bb-0310-9956-ffa450edef68
* Add dav_get_liveprop_element() to hide the implementation by whichGraham Leggett2021-09-262-9/+18
| | | | | | | the element is passed. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1893643 13f79535-47bb-0310-9956-ffa450edef68
* * Correctly handle errors returned by dav providers on REPORT requests.Ruediger Pluem2021-09-241-21/+23
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1893589 13f79535-47bb-0310-9956-ffa450edef68
* Add log tags.Graham Leggett2021-06-242-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1891023 13f79535-47bb-0310-9956-ffa450edef68
* dbm: Split the loading of a dbm driver from the opening of a dbm file. WhenGraham Leggett2021-06-242-1/+52
| | | | | | | | an attempt to load a dbm driver fails, log clearly which driver triggered the error (not "default"), and what the error was. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1891019 13f79535-47bb-0310-9956-ffa450edef68
* * modules/dav/fs/repos.c (dav_fs_open_stream): Add specific logs forJoe Orton2020-09-151-1/+15
| | | | | | | | | | | | different modes in dav_fs_open_stream(), indicate failure because of different file open modes. Also add the filepath in the log messages. Github: closes #138 PR: 64413 Submitted by: Bingyu Shen <ahshenbingyu gmail.com> git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1881736 13f79535-47bb-0310-9956-ffa450edef68
* mod_dav: Some DAV extensions, like CalDAV, specify both documentGraham Leggett2020-07-152-0/+32
| | | | | | | | | | elements and property elements that need to be taken into account when generating a property. The document element and property element are made available in the dav_liveprop_elem structure under the DAV_PROP_ELEMENT key in the resource pool. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1879889 13f79535-47bb-0310-9956-ffa450edef68
* mod_dav: Add utility functions dav_validate_root_ns(),Graham Leggett2020-07-152-7/+66
| | | | | | | | dav_find_child_ns(), dav_find_next_ns(), dav_find_attr_ns() and dav_find_attr() so that other modules get to play too. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1879888 13f79535-47bb-0310-9956-ffa450edef68
* Extend method_precondition hook to be called during the PROPFINDGraham Leggett2020-07-052-4/+29
| | | | | | | and LABEL walkers, once for each walked resource. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1879522 13f79535-47bb-0310-9956-ffa450edef68
* mod_dav: Allow other DAV modules to use dav_get_resource().Graham Leggett2020-07-032-1/+4
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1879466 13f79535-47bb-0310-9956-ffa450edef68
* Begone foul tabs.Graham Leggett2020-06-291-26/+26
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1879340 13f79535-47bb-0310-9956-ffa450edef68
* mod_dav: Add method_precondition hook. WebDAV extensions defineGraham Leggett2020-06-292-18/+205
| | | | | | | | conditions that must exist before a WebDAV method can be executed. This hook allows a WebDAV extension to verify these preconditions. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1879339 13f79535-47bb-0310-9956-ffa450edef68
* Be defensive when the request is missing.Graham Leggett2020-06-291-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1879322 13f79535-47bb-0310-9956-ffa450edef68
* Add implementation of deliver_report and gather_reports to mod_dav.c.Graham Leggett2020-06-281-97/+157
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1879307 13f79535-47bb-0310-9956-ffa450edef68
* Add hooks deliver_report and gather_reports to mod_dav.h. Allows otherGraham Leggett2020-06-282-4/+47
| | | | | | | modules apart from versioning implementations to handle the REPORT method. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1879306 13f79535-47bb-0310-9956-ffa450edef68
* Add dav_get_provider(), dav_open_lockdb() and dav_close_lockdb() mod_dav.h.Graham Leggett2020-06-282-3/+15
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1879305 13f79535-47bb-0310-9956-ffa450edef68
* "[mod_dav_fs etag handling] should really honor the FileETag setting".Graham Leggett2020-06-271-14/+13
| | | | | | | | | | | | | | | | - 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. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1879285 13f79535-47bb-0310-9956-ffa450edef68
* Follow up to r1879074: don't let dav_process_if_header() go above root.Yann Ylavic2020-06-241-0/+1
| | | | | | | And fall through as "/". git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1879149 13f79535-47bb-0310-9956-ffa450edef68
* Add ap_normalize_path() to replace ap_getparents() (with options).Yann Ylavic2020-06-221-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | include/httpd.h: Declare ap_normalize_path() and flags. AP_NORMALIZE_ALLOW_RELATIVE: Don't require that the path be absolute as per RFC 7230. This is needed for lookup subrequests. AP_NORMALIZE_NOT_ABOVE_ROOT: Check that directory traversal ("..") don't go above root, or initial directory with relative paths. AP_NORMALIZE_DECODE_UNRESERVED: Decode unreserved characters (like '.') first since they have the same semantics encoded and decoded. AP_NORMALIZE_MERGE_SLASHES: Merge multiple slahes into a single one. AP_NORMALIZE_DROP_PARAMETERS: Ignore path parameters (";foo=bar"). Not used by httpd but since ap_normalize_path() is taken from mod_jk's jk_servlet_normalize() it can allow them to use the upstream version now. server/util.c: Implement ap_normalize_path(). modules/dav/main/util.c: Replace call to ap_getparents() using ap_normalize_path() with AP_NORMALIZE_DECODE_UNRESERVED flag since the path comes from an obsolute URL (thus potentially %-encoded). modules/generators/mod_autoindex.c: Replace call to ap_getparents() using ap_normalize_path() with AP_NORMALIZE_ALLOW_RELATIVE and AP_NORMALIZE_NOT_ABOVE_ROOT flags to be consistent with original code. include/ap_mmn.h: MINOR bump for ap_normalize_path(). git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1879074 13f79535-47bb-0310-9956-ffa450edef68
* core,modules: provide/use ap_parse_strict_length() helper.Yann Ylavic2020-05-201-16/+7
| | | | | | | | | It helps simplifying a lot of duplicated code based on apr_strtoff(), while also rejecting leading plus/minus signs which are dissalowed in Content-Length and (Content-)Range headers. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877954 13f79535-47bb-0310-9956-ffa450edef68
* Add missing pool tags to help debugging.Yann Ylavic2020-04-161-0/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876599 13f79535-47bb-0310-9956-ffa450edef68
* * module/dav/main/util.c (dav_check_bufsize): Don't callJoe Orton2020-02-171-1/+5
| | | | | | | | memcpy(,NULL,0) if the buffer is uninitialized, to avoid tripping UBSan. (Unclear if this is valid for this API.) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1874144 13f79535-47bb-0310-9956-ffa450edef68
* Fix spelling errors found by codespell. [skip ci]Mike Rumph2020-02-133-5/+5
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1873985 13f79535-47bb-0310-9956-ffa450edef68
* PR62989: DOCTYPE tags in server-generated HTML. Eric Covener2020-01-311-1/+1
| | | | | | | | | Submitted By: Andra Farkas <deepbluemistake gmail.com>, Giovanni Bechis <giovanni paclan.it> git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1873397 13f79535-47bb-0310-9956-ffa450edef68
* * Replace apr_psprintf with apr_pstrcat where the format strings onlyRuediger Pluem2019-06-286-47/+55
| | | | | | | | | 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. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1862270 13f79535-47bb-0310-9956-ffa450edef68