idnits 2.17.1 draft-ietf-webdav-rfc2518bis-18.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** It looks like you're using RFC 3978 boilerplate. You should update this to the boilerplate described in the IETF Trust License Policy document (see https://trustee.ietf.org/license-info), which is required now. -- Found old boilerplate from RFC 3978, Section 5.1 on line 16. -- Found old boilerplate from RFC 3978, Section 5.5, updated by RFC 4748 on line 6115. -- Found old boilerplate from RFC 3979, Section 5, paragraph 1 on line 6126. -- Found old boilerplate from RFC 3979, Section 5, paragraph 2 on line 6133. -- Found old boilerplate from RFC 3979, Section 5, paragraph 3 on line 6139. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- -- The draft header indicates that this document obsoletes RFC2518, but the abstract doesn't seem to directly say this. It does mention RFC2518 though, so this could be OK. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust Copyright Line does not match the current year == Line 575 has weird spacing: '... 495 The value of the property appears inside the property name element. 496 The value may be any kind of well-formed XML content, including both 497 text-only and mixed content. Servers MUST preserve the following XML 498 Information Items (using the terminology from [REC-XML-INFOSET]) in 499 storage and transmission of dead properties: 501 For the property name Element Information Item itself: 503 [namespace name] 505 [local name] 507 [attributes] named "xml:lang" or any such attribute in scope 509 [children] of type element or character 511 On all Element Information Items in the property value: 513 [namespace name] 515 [local name] 517 [attributes] 519 [children] of type element or character 521 On Attribute Information Items in the property value: 523 [namespace name] 525 [local name] 527 [normalized value] 529 On Character Information Items in the property value: 531 [character code] 533 Since prefixes are used in some XML vocabularies (XPath and XML 534 Schema, for example), servers SHOULD preserve, for any Information 535 Item in the value: 537 [prefix] 539 XML Infoset attributes not listed above MAY be preserved by the 540 server, but clients MUST NOT rely on them being preserved. The above 541 rules would also apply by default to live properties, unless defined 542 otherwise. 544 Servers MUST ignore the XML attribute xml:space if present and never 545 use it to change white space handling. White space in property 546 values is significant. 548 4.3.1. Example - Property with Mixed Content 550 Consider a dead property 'author' created by the client as follows: 552 553 554 Jane Doe 555 556 mailto:jane.doe@example.com 558 http://www.example.com 560 561 Jane has been working way too long on the 562 long-awaited revision of ]]>. 563 564 565 567 When this property is requested, a server might return: 569 574 Jane Doe 575 mailto:jane.doe@example.com 577 http://www.example.com 579 580 Jane has been working way too long on the 581 long-awaited revision of <RFC2518>. 582 583 584 586 Note in this example: 588 o The [prefix] for the property name itself was not preserved, being 589 non-significant, all other [prefix] values have been preserved, 591 o attribute values have been rewritten with double quotes instead of 592 single quotes (quoting style is not significant), and attribute 593 order has not been preserved, 595 o the xml:lang attribute has been returned on the property name 596 element itself (it was in scope when the property was set, but the 597 exact position in the response is not considered significant as 598 long as it is in scope), 600 o whitespace between tags has been preserved everywhere (whitespace 601 between attributes not so), 603 o CDATA encapsulation was replaced with character escaping (the 604 reverse would also be legal), 606 o the comment item was stripped (as would have been a processing 607 instruction item). 609 Implementation note: there are cases such as editing scenarios where 610 clients may require that XML content is preserved character-by- 611 character (such as attribute ordering or quoting style). In this 612 case, clients should consider using a text-only property value by 613 escaping all characters that have a special meaning in XML parsing. 615 4.4. Property Names 617 A property name is a universally unique identifier that is associated 618 with a schema that provides information about the syntax and 619 semantics of the property. 621 Because a property's name is universally unique, clients can depend 622 upon consistent behavior for a particular property across multiple 623 resources, on the same and across different servers, so long as that 624 property is "live" on the resources in question, and the 625 implementation of the live property is faithful to its definition. 627 The XML namespace mechanism, which is based on URIs ([RFC3986]), is 628 used to name properties because it prevents namespace collisions and 629 provides for varying degrees of administrative control. 631 The property namespace is flat; that is, no hierarchy of properties 632 is explicitly recognized. Thus, if a property A and a property A/B 633 exist on a resource, there is no recognition of any relationship 634 between the two properties. It is expected that a separate 635 specification will eventually be produced which will address issues 636 relating to hierarchical properties. 638 Finally, it is not possible to define the same property twice on a 639 single resource, as this would cause a collision in the resource's 640 property namespace. 642 4.5. Source Resources and Output Resources 644 Some HTTP resources are dynamically generated by the server. For 645 these resources, there presumably exists source code somewhere 646 governing how that resource is generated. The relationship of source 647 files to output HTTP resources may be one to one, one to many, many 648 to one or many to many. There is no mechanism in HTTP to determine 649 whether a resource is even dynamic, let alone where its source files 650 exist or how to author them. Although this problem would usefully be 651 solved, interoperable WebDAV implementations have been widely 652 deployed without actually solving this problem, by dealing only with 653 static resources. Thus, the source vs. output problem is not solved 654 in this specification and has been deferred to a separate document. 656 5. Collections of Web Resources 658 This section provides a description of a type of Web resource, the 659 collection, and discusses its interactions with the HTTP URL 660 namespace and with HTTP methods. The purpose of a collection 661 resource is to model collection-like objects (e.g., file system 662 directories) within a server's namespace. 664 All DAV compliant resources MUST support the HTTP URL namespace model 665 specified herein. 667 5.1. HTTP URL Namespace Model 669 The HTTP URL namespace is a hierarchical namespace where the 670 hierarchy is delimited with the "/" character. 672 An HTTP URL namespace is said to be consistent if it meets the 673 following conditions: for every URL in the HTTP hierarchy there 674 exists a collection that contains that URL as an internal member URL. 675 The root, or top-level collection of the namespace under 676 consideration, is exempt from the previous rule. The top-level 677 collection of the namespace under consideration is not necessarily 678 the collection identified by the absolute path '/', it may be 679 identified by one or more path segments (e.g. /servlets/webdav/...) 681 Neither HTTP/1.1 nor WebDAV require that the entire HTTP URL 682 namespace be consistent -- a WebDAV-compatible resource may not have 683 a parent collection. However, certain WebDAV methods are prohibited 684 from producing results that cause namespace inconsistencies. 686 As is implicit in [RFC2616] and [RFC3986], any resource, including 687 collection resources, MAY be identified by more than one URI. For 688 example, a resource could be identified by multiple HTTP URLs. 690 5.2. Collection Resources 692 Collection resources differ from other resources in that they also 693 act as containers. Some HTTP methods apply only to a collection, but 694 some apply to some or all of the resources inside the container 695 defined by the collection. When the scope of a method is not clear, 696 the client can specify what depth to apply. Depth can be either zero 697 levels in (only the collection), one level (the collection and 698 directly contained resources) or infinite levels (the collection and 699 all contained resources recursively). 701 A collection's state consists of at least a set of mappings between 702 path segments and resources, and a set of properties on the 703 collection itself. In this document, a resource B will be said to be 704 contained in the collection resource A if there is a path segment 705 mapping which maps to B and which is contained in A. A collection 706 MUST contain at most one mapping for a given path segment, i.e., it 707 is illegal to have the same path segment mapped to more than one 708 resource. 710 Properties defined on collections behave exactly as do properties on 711 non-collection resources. A collection MAY have additional state 712 such as entity bodies returned by GET. 714 For all WebDAV compliant resources A and B, identified by URLs "U" 715 and "V" respectively, such that "V" is equal to "U/SEGMENT", A MUST 716 be a collection that contains a mapping from "SEGMENT" to B. So, if 717 resource B with URL "http://example.com/bar/blah" is WebDAV compliant 718 and if resource A with URL "http://example.com/bar/" is WebDAV 719 compliant, then resource A must be a collection and must contain 720 exactly one mapping from "blah" to B. 722 Although commonly a mapping consists of a single segment and a 723 resource, in general, a mapping consists of a set of segments and a 724 resource. This allows a server to treat a set of segments as 725 equivalent (i.e. either all of the segments are mapped to the same 726 resource, or none of the segments are mapped to a resource). For 727 example, a server that performs case-folding on segments will treat 728 the segments "ab", "Ab", "aB", and "AB" as equivalent. A client can 729 then use any of these segments to identify the resource. Note that a 730 PROPFIND result will select one of these equivalent segments to 731 identify the mapping, so there will be one PROPFIND response element 732 per mapping, not one per segment in the mapping. 734 Collection resources MAY have mappings to non-WebDAV compliant 735 resources in the HTTP URL namespace hierarchy but are not required to 736 do so. For example, if resource X with URL 737 "http://example.com/bar/blah" is not WebDAV compliant and resource A 738 with "URL http://example.com/bar/" identifies a WebDAV collection, 739 then A may or may not have a mapping from "blah" to X. 741 If a WebDAV compliant resource has no WebDAV compliant internal 742 members in the HTTP URL namespace hierarchy then the WebDAV compliant 743 resource is not required to be a collection. 745 There is a standing convention that when a collection is referred to 746 by its name without a trailing slash, the server MAY handle the 747 request as if the trailing slash were present. In this case it 748 SHOULD return a Content-Location header in the response, pointing to 749 the URL ending with the "/". For example, if a client invokes a 750 method on http://example.com/blah (no trailing slash), the server may 751 respond as if the operation were invoked on http://example.com/blah/ 752 (trailing slash), and should return a Content-Location header with 753 the value http://example.com/blah/. Wherever a server produces a URL 754 referring to a collection, the server SHOULD include the trailing 755 slash. In general clients SHOULD use the trailing slash form of 756 collection names. If clients do not use the trailing slash form the 757 client needs to be prepared to see a redirect response. Clients will 758 find the DAV:resourcetype property more reliable than the URL to find 759 out if a resource is a collection. 761 Clients MUST be able to support the case where WebDAV resources are 762 contained inside non-WebDAV resources. For example, if a OPTIONS 763 response from "http://example.com/servlet/dav/collection" indicates 764 WebDAV support, the client cannot assume that 765 "http://example.com/servlet/dav/" or its parent necessarily are 766 WebDAV collections. 768 A typical scenario in which mapped URLs do not appear as members of 769 their parent collection is the case where a server allows links or 770 redirects to non-WebDAV resources. For instance, "/col/link" might 771 not appear as a member of "/col/", although the server would respond 772 with a 302 status to a GET request to "/col/link", thus the URL 773 "/col/link" would indeed be mapped. Similarly, a dynamically- 774 generated page might have a URL mapping from "/col/index.html", thus 775 this resource might respond with a 200 OK to a GET request yet not 776 appear as a member of "/col/". 778 Some mappings to even WebDAV-compliant resources might not appear in 779 the parent collection. An example for this case are servers that 780 support multiple alias URLs for each WebDAV compliant resource. A 781 server may implement case-insensitive URLs, thus "/col/a" and 782 "/col/A" identify the same resource, yet only either "a" or "A" are 783 reported upon listing the members of "/col". In cases where a server 784 treats a set of segments as equivalent, the server MUST expose only 785 one preferred segment per mapping, consistently chosen, in PROPFIND 786 responses. 788 6. Locking 790 The ability to lock a resource provides a mechanism for serializing 791 access to that resource. Using a lock, an authoring client can 792 provide a reasonable guarantee that another principal will not modify 793 a resource while it is being edited. In this way, a client can 794 prevent the "lost update" problem. 796 This specification allows locks to vary over two client-specified 797 parameters, the number of principals involved (exclusive vs. shared) 798 and the type of access to be granted. This document defines locking 799 for only one access type, write. However, the syntax is extensible, 800 and permits the eventual specification of locking for other access 801 types. 803 6.1. Lock Model 805 This section provides a concise model for how locking behaves. Later 806 sections will provide more detail on some of the concepts and refer 807 back to these model statements. Normative statements related to LOCK 808 and UNLOCK method handling can be found in the sections on those 809 methods, whereas normative statements that cover any method are 810 gathered here. 812 1. A lock either directly or indirectly locks a resource. 814 2. A resource becomes directly locked when a LOCK request to a URL 815 of that resource creates a new lock. The "lock-root" of the new 816 lock is that URL. If at the time of the request, the URL is not 817 mapped to a resource, a new empty resource is created and 818 directly locked. 820 3. An exclusive lock (Section 6.2) conflicts with any other kind of 821 lock on the same resource, whether either lock is direct or 822 indirect. A server MUST NOT create conflicting locks on a 823 resource. 825 4. For a collection that is locked with a depth-infinity lock L, all 826 member resources are indirectly locked. Changes in membership of 827 a such a collection affect the set of indirectly locked 828 resources: 830 * If a member resource is added to the collection, the new 831 member resource MUST NOT already have a conflicting lock, 832 because the new resource MUST become indirectly locked by L. 834 * If a member resource stops being a member of the collection, 835 then the resource MUST no longer be indirectly locked by L. 837 5. Each lock is identified by a single globally unique lock token 838 (Section 6.5). 840 6. An UNLOCK request deletes the lock with the specified lock token. 841 After a lock is deleted, no resource is locked by that lock. 843 7. A lock token is "submitted" in a request when it appears in an 844 "If" header (the Write Lock (Section 7) section discusses when 845 token submission is required for write locks). 847 8. If a request causes the lock-root of any lock to become an 848 unmapped URL, then the lock MUST also be deleted by that request. 850 6.2. Exclusive Vs. Shared Locks 852 The most basic form of lock is an exclusive lock. Exclusive locks 853 avoid having to deal with content change conflicts, without requiring 854 any coordination other than the methods described in this 855 specification. 857 However, there are times when the goal of a lock is not to exclude 858 others from exercising an access right but rather to provide a 859 mechanism for principals to indicate that they intend to exercise 860 their access rights. Shared locks are provided for this case. A 861 shared lock allows multiple principals to receive a lock. Hence any 862 principal that has both access privileges and a valid lock can use 863 the locked resource. 865 With shared locks there are two trust sets that affect a resource. 866 The first trust set is created by access permissions. Principals who 867 are trusted, for example, may have permission to write to the 868 resource. Among those who have access permission to write to the 869 resource, the set of principals who have taken out a shared lock also 870 must trust each other, creating a (typically) smaller trust set 871 within the access permission write set. 873 Starting with every possible principal on the Internet, in most 874 situations the vast majority of these principals will not have write 875 access to a given resource. Of the small number who do have write 876 access, some principals may decide to guarantee their edits are free 877 from overwrite conflicts by using exclusive write locks. Others may 878 decide they trust their collaborators will not overwrite their work 879 (the potential set of collaborators being the set of principals who 880 have write permission) and use a shared lock, which informs their 881 collaborators that a principal may be working on the resource. 883 The WebDAV extensions to HTTP do not need to provide all of the 884 communications paths necessary for principals to coordinate their 885 activities. When using shared locks, principals may use any out of 886 band communication channel to coordinate their work (e.g., face-to- 887 face interaction, written notes, post-it notes on the screen, 888 telephone conversation, email, etc.) The intent of a shared lock is 889 to let collaborators know who else may be working on a resource. 891 Shared locks are included because experience from web distributed 892 authoring systems has indicated that exclusive locks are often too 893 rigid. An exclusive lock is used to enforce a particular editing 894 process: take out an exclusive lock, read the resource, perform 895 edits, write the resource, release the lock. This editing process 896 has the problem that locks are not always properly released, for 897 example when a program crashes, or when a lock creator leaves without 898 unlocking a resource. While both timeouts (Section 6.6) and 899 administrative action can be used to remove an offending lock, 900 neither mechanism may be available when needed; the timeout may be 901 long or the administrator may not be available. 903 A successful request for a new shared lock MUST result in the 904 generation of a unique lock associated with the requesting principal. 905 Thus if five principals have taken out shared write locks on the same 906 resource there will be five locks and five lock tokens, one for each 907 principal. 909 6.3. Required Support 911 A WebDAV compliant resource is not required to support locking in any 912 form. If the resource does support locking it may choose to support 913 any combination of exclusive and shared locks for any access types. 915 The reason for this flexibility is that locking policy strikes to the 916 very heart of the resource management and versioning systems employed 917 by various storage repositories. These repositories require control 918 over what sort of locking will be made available. For example, some 919 repositories only support shared write locks while others only 920 provide support for exclusive write locks while yet others use no 921 locking at all. As each system is sufficiently different to merit 922 exclusion of certain locking features, this specification leaves 923 locking as the sole axis of negotiation within WebDAV. 925 6.4. Lock Creator and Privileges 927 The creator of a lock has special privileges to use the lock to 928 modify the resource. When a locked resource is modified, a server 929 MUST check that the authenticated principal matches the lock creator 930 (in addition to checking for valid lock token submission). 932 The server MAY allow privileged users other than the lock creator to 933 destroy a lock (for example, the resource owner or an administrator). 934 The 'unlock' privilege in [RFC3744] was defined to provide that 935 permission. 937 There is no requirement for servers to accept LOCK requests from all 938 users or from anonymous users. 940 Note that having a lock does not confer full privilege to modify the 941 locked resource. Write access and other privileges MUST be enforced 942 through normal privilege or authentication mechanisms, not based on 943 the possible obscurity of lock token values. 945 6.5. Lock Tokens 947 A lock token is a type of state token which identifies a particular 948 lock. Each lock has exactly one unique lock token generated by the 949 server. Clients MUST NOT attempt to interpret lock tokens in any 950 way. 952 Lock token URIs MUST be unique across all resources for all time. 953 This uniqueness constraint allows lock tokens to be submitted across 954 resources and servers without fear of confusion. Since lock tokens 955 are unique, a client MAY submit a lock token in an If header on a 956 resource other than the one that returned it. 958 When a LOCK operation creates a new lock, the new lock token is 959 returned in the Lock-Token response header defined in Section 10.5, 960 and also in the body of the response. 962 Servers MAY make lock tokens publicly readable (e.g. in the DAV: 963 lockdiscovery property). One use case for making lock tokens 964 readable is so that a long-lived lock can be removed by the resource 965 owner (the client that obtained the lock might have crashed or 966 disconnected before cleaning up the lock). Except for the case of 967 using UNLOCK under user guidance, a client SHOULD NOT use a lock 968 token created by another client instance. 970 This specification encourages servers to create UUIDs for lock 971 tokens, and to use the URI form defined by "A Universally Unique 972 Identifier (UUID) URN Namespace" ([RFC4122]). However servers are 973 free to use any URI (e.g. from another scheme) so long as it meets 974 the uniqueness requirements. For example, a valid lock token might 975 be constructed using the "opaquelocktoken" scheme defined in 976 Appendix C. 978 Example: "urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6" 980 6.6. Lock Timeout 982 A lock MAY have a limited lifetime. The lifetime is suggested by the 983 client when creating or refreshing the lock, but the server 984 ultimately chooses the timeout value. Timeout is measured in seconds 985 remaining until lock expiration. 987 The timeout counter MUST be restarted if a refresh lock request is 988 successful (see Section 9.10.2). The timeout counter SHOULD NOT be 989 restarted at any other time. 991 If the timeout expires then the lock SHOULD be removed. In this case 992 the server SHOULD act as if an UNLOCK method was executed by the 993 server on the resource using the lock token of the timed-out lock, 994 performed with its override authority. 996 Servers are advised to pay close attention to the values submitted by 997 clients, as they will be indicative of the type of activity the 998 client intends to perform. For example, an applet running in a 999 browser may need to lock a resource, but because of the instability 1000 of the environment within which the applet is running, the applet may 1001 be turned off without warning. As a result, the applet is likely to 1002 ask for a relatively small timeout value so that if the applet dies, 1003 the lock can be quickly harvested. However, a document management 1004 system is likely to ask for an extremely long timeout because its 1005 user may be planning on going off-line. 1007 A client MUST NOT assume that just because the time-out has expired 1008 the lock has immediately been removed. 1010 Likewise, a client MUST NOT assume that just because the time-out has 1011 not expired, the lock still exists. Clients MUST assume that locks 1012 can arbitrarily disappear at any time, regardless of the value given 1013 in the Timeout header. The Timeout header only indicates the 1014 behavior of the server if extraordinary circumstances do not occur. 1015 For example, a sufficiently privileged user may remove a lock at any 1016 time or the system may crash in such a way that it loses the record 1017 of the lock's existence. 1019 6.7. Lock Capability Discovery 1021 Since server lock support is optional, a client trying to lock a 1022 resource on a server can either try the lock and hope for the best, 1023 or perform some form of discovery to determine what lock capabilities 1024 the server supports. This is known as lock capability discovery. A 1025 client can determine what lock types the server supports by 1026 retrieving the DAV:supportedlock property. 1028 Any DAV compliant resource that supports the LOCK method MUST support 1029 the DAV:supportedlock property. 1031 6.8. Active Lock Discovery 1033 If another principal locks a resource that a principal wishes to 1034 access, it is useful for the second principal to be able to find out 1035 who the first principal is. For this purpose the DAV:lockdiscovery 1036 property is provided. This property lists all outstanding locks, 1037 describes their type, and MAY even provide the lock tokens. 1039 Any DAV compliant resource that supports the LOCK method MUST support 1040 the DAV:lockdiscovery property. 1042 7. Write Lock 1044 This section describes the semantics specific to the write lock type. 1045 The write lock is a specific instance of a lock type, and is the only 1046 lock type described in this specification. 1048 An exclusive write lock protects a resource: it prevents changes by 1049 any principal other than the lock creator and in any case where the 1050 lock token is not submitted (e.g. by a client process other than the 1051 one holding the lock). 1053 Clients MUST submit a lock-token they are authorized to use in any 1054 request which modifies a write-locked resource. The list of 1055 modifications covered by a write-lock include: 1057 1. A change to any of the following aspects of any write-locked 1058 resource: 1060 * any variant, 1062 * any dead property, 1064 * any live property which is lockable (a live property is 1065 lockable unless otherwise defined.) 1067 2. For collections, any modification of an internal member URI. An 1068 internal member URI of a collection is considered to be modified 1069 if it is added, removed, or identifies a different resource. 1070 More discussion on write locks and collections is found in 1071 Section 7.4. 1073 3. A modification of the mapping of the root of the write lock, 1074 either to another resource or to no resource (e.g. DELETE). 1076 Of the methods defined in HTTP and WebDAV, PUT, POST, PROPPATCH, 1077 LOCK, UNLOCK, MOVE, COPY (for the destination resource), DELETE, and 1078 MKCOL are affected by write locks. All other HTTP/WebDAV methods 1079 defined so far, GET in particular, function independently of a write 1080 lock. 1082 The next few sections describe in more specific terms how write locks 1083 interact with various operations. 1085 7.1. Write Locks and Properties 1087 While those without a write lock may not alter a property on a 1088 resource it is still possible for the values of live properties to 1089 change, even while locked, due to the requirements of their schemas. 1091 Only dead properties and live properties defined as lockable are 1092 guaranteed not to change while write locked. 1094 7.2. Avoiding Lost Updates 1096 Although the write locks provide some help in preventing lost 1097 updates, they cannot guarantee that updates will never be lost. 1098 Consider the following scenario: 1100 Two clients A and B are interested in editing the resource 1101 'index.html'. Client A is an HTTP client rather than a WebDAV 1102 client, and so does not know how to perform locking. 1104 Client A doesn't lock the document, but does a GET and begins 1105 editing. 1107 Client B does LOCK, performs a GET and begins editing. 1109 Client B finishes editing, performs a PUT, then an UNLOCK. 1111 Client A performs a PUT, overwriting and losing all of B's changes. 1113 There are several reasons why the WebDAV protocol itself cannot 1114 prevent this situation. First, it cannot force all clients to use 1115 locking because it must be compatible with HTTP clients that do not 1116 comprehend locking. Second, it cannot require servers to support 1117 locking because of the variety of repository implementations, some of 1118 which rely on reservations and merging rather than on locking. 1119 Finally, being stateless, it cannot enforce a sequence of operations 1120 like LOCK / GET / PUT / UNLOCK. 1122 WebDAV servers that support locking can reduce the likelihood that 1123 clients will accidentally overwrite each other's changes by requiring 1124 clients to lock resources before modifying them. Such servers would 1125 effectively prevent HTTP 1.0 and HTTP 1.1 clients from modifying 1126 resources. 1128 WebDAV clients can be good citizens by using a lock / retrieve / 1129 write /unlock sequence of operations (at least by default) whenever 1130 they interact with a WebDAV server that supports locking. 1132 HTTP 1.1 clients can be good citizens, avoiding overwriting other 1133 clients' changes, by using entity tags in If-Match headers with any 1134 requests that would modify resources. 1136 Information managers may attempt to prevent overwrites by 1137 implementing client-side procedures requiring locking before 1138 modifying WebDAV resources. 1140 7.3. Write Locks and Unmapped URLs 1142 WebDAV provides the ability to send a LOCK request to an unmapped URL 1143 in order to reserve the name for use. This is a simple way to avoid 1144 the lost-update problem on the creation of a new resource (another 1145 way is to use If-None-Match header specified in Section 14.26 of 1146 [RFC2616]). It has the side benefit of locking the new resource 1147 immediately for use of the creator. 1149 Note that the lost-update problem is not an issue for collections 1150 because MKCOL can only be used to create a collection, not to 1151 overwrite an existing collection. When trying to lock a collection 1152 upon creation, clients can attempt to increase the likelihood of 1153 getting the lock by pipelining the MKCOL and LOCK requests together 1154 (but because this doesn't convert two separate operations into one 1155 atomic operation there's no guarantee this will work). 1157 A successful lock request to an unmapped URL MUST result in the 1158 creation of a locked (non-collection) resource with empty content. 1159 Subsequently, a successful PUT request (with the correct lock token) 1160 provides the content for the resource. Note that the LOCK request 1161 has no mechanism for the client to provide Content-Type or Content- 1162 Language, thus the server will use defaults or empty values and rely 1163 on the subsequent PUT request for correct values. 1165 A resource created with a LOCK is empty but otherwise behaves in 1166 every way as a normal resource. It behaves the same way as a 1167 resource created by a PUT request with an empty body (and where a 1168 Content-Type and Content-Language was not specified), followed by a 1169 LOCK request to the same resource. Following from this model, a 1170 locked empty resource: 1172 o Can be read, deleted, moved, copied, and in all ways behave as a 1173 regular non-collection resource. 1175 o Appears as a member of its parent collection. 1177 o SHOULD NOT disappear when its lock goes away (clients must 1178 therefore be responsible for cleaning up their own mess, as with 1179 any other operation or any non-empty resource) 1181 o MAY NOT have values for properties like DAV:getcontentlanguage 1182 which haven't been specified yet by the client. 1184 o Can be updated (have content added) with a PUT request. 1186 o MUST NOT be converted into a collection. The server MUST fail a 1187 MKCOL request (as it would with a MKCOL request to any existing 1188 non-collection resource). 1190 o MUST have defined values for DAV:lockdiscovery and DAV: 1191 supportedlock properties. 1193 o The response MUST indicate that a resource was created, by use of 1194 the "201 Created" response code (a LOCK request to an existing 1195 resource instead will result in 200 OK). The body must still 1196 include the DAV:lockdiscovery property, as with a LOCK request to 1197 an existing resource. 1199 The client is expected to update the locked empty resource shortly 1200 after locking it, using PUT and possibly PROPPATCH. 1202 Alternatively and for backwards compatibility to [RFC2518], servers 1203 MAY implement Lock-Null Resources (LNRs) instead (see definition in 1204 Appendix D). Clients can easily interoperate both with servers that 1205 support the old model LNRs and the recommended model of "locked empty 1206 resources" by only attempting PUT after a LOCK to an unmapped URL, 1207 not MKCOL or GET, and by not relying on specific properties of LNRs. 1209 7.4. Write Locks and Collections 1211 There are two kinds of collection write locks. A depth-0 write lock 1212 on a collection protects the collection properties plus the internal 1213 member URLs of that one collection, while not protecting the content 1214 or properties of member resources (if the collection itself has any 1215 entity bodies, those are also protected). A depth-infinity write 1216 lock on a collection provides the same protection on that collection 1217 and also provides write lock protection on every member resource. 1219 Expressed otherwise, a write lock protects any request that would 1220 create a new resource in a write locked collection, any request that 1221 would remove an internal member URL of a write locked collection, and 1222 any request that would change the segment name of any internal 1223 member. 1225 Thus, a collection write lock protects all the following actions: 1227 o DELETE a collection's direct internal member, 1229 o MOVE an internal member out of the collection, 1231 o MOVE an internal member into the collection, 1233 o MOVE to rename an internal member within a collection, 1234 o COPY an internal member into a collection, and 1236 o PUT or MKCOL request which would create a new internal member. 1238 The collection's lock token is required in addition to the lock token 1239 on the internal member itself, if it is locked separately. 1241 In addition, a depth-infinity lock affects all write operations to 1242 all members of the locked collection. With a depth-infinity lock, 1243 the resource identified by the root of the lock is directly locked, 1244 and all its members are indirectly locked. 1246 o Any new resource added as a descendent of a depth-infinity locked 1247 collection becomes indirectly locked. 1249 o Any indirectly locked resource moved out of the locked collection 1250 into an unlocked collection is thereafter unlocked. 1252 o Any indirectly locked resource moved out of a locked source 1253 collection into a depth-infinity locked target collection remains 1254 indirectly locked but is now protected by the lock on the target 1255 collection (the target collection's lock token will thereafter be 1256 required to make further changes). 1258 If a depth-infinity write LOCK request is issued to a collection 1259 containing member URLs identifying resources that are currently 1260 locked in a manner which conflicts with the new lock (see Section 6.1 1261 point 3), the request MUST fail with a 423 (Locked) status code, and 1262 the response SHOULD contain the 'no-conflicting-lock' precondition. 1264 If a lock request causes the URL of a resource to be added as an 1265 internal member URL of a depth-infinity locked collection then the 1266 new resource MUST be automatically protected by the lock. For 1267 example, if the collection /a/b/ is write locked and the resource /c 1268 is moved to /a/b/c then resource /a/b/c will be added to the write 1269 lock. 1271 7.5. Write Locks and the If Request Header 1273 A user agent has to demonstrate knowledge of a lock when requesting 1274 an operation on a locked resource. Otherwise, the following scenario 1275 might occur. In the scenario, program A, run by User A, takes out a 1276 write lock on a resource. Program B, also run by User A, has no 1277 knowledge of the lock taken out by program A, yet performs a PUT to 1278 the locked resource. In this scenario, the PUT succeeds because 1279 locks are associated with a principal, not a program, and thus 1280 program B, because it is acting with principal A's credential, is 1281 allowed to perform the PUT. However, had program B known about the 1282 lock, it would not have overwritten the resource, preferring instead 1283 to present a dialog box describing the conflict to the user. Due to 1284 this scenario, a mechanism is needed to prevent different programs 1285 from accidentally ignoring locks taken out by other programs with the 1286 same authorization. 1288 In order to prevent these collisions a lock token MUST be submitted 1289 by an authorized principal for all locked resources that a method may 1290 change or the method MUST fail. A lock token is submitted when it 1291 appears in an If header. For example, if a resource is to be moved 1292 and both the source and destination are locked then two lock tokens 1293 must be submitted in the If header, one for the source and the other 1294 for the destination. 1296 7.5.1. Example - Write Lock and COPY 1298 >>Request 1300 COPY /~fielding/index.html HTTP/1.1 1301 Host: www.example.com 1302 Destination: http://www.example.com/users/f/fielding/index.html 1303 If: 1304 () 1306 >>Response 1308 HTTP/1.1 204 No Content 1310 In this example, even though both the source and destination are 1311 locked, only one lock token must be submitted, for the lock on the 1312 destination. This is because the source resource is not modified by 1313 a COPY, and hence unaffected by the write lock. In this example, 1314 user agent authentication has previously occurred via a mechanism 1315 outside the scope of the HTTP protocol, in the underlying transport 1316 layer. 1318 7.5.2. Example - Deleting a Member of a Locked Collection 1320 Consider a collection "/locked" with an exclusive, depth-infinity 1321 write lock, and an attempt to delete an internal member "/locked/ 1322 member": 1324 >>Request 1326 DELETE /locked/member HTTP/1.1 1327 Host: example.com 1329 >>Response 1331 HTTP/1.1 423 Locked 1332 Content-Type: application/xml; charset="utf-8" 1333 Content-Length: xxxx 1335 1336 1337 1338 /locked/ 1339 1340 1342 Thus the client would need to submit the lock token with the request 1343 to make it succeed. To do that, various forms of the If header (see 1344 Section 10.4) could be used. 1346 "No-Tag-List" format: 1348 If: () 1350 "Tagged-List" format, for "http://example.com/locked/": 1352 If: 1353 () 1355 "Tagged-List" format, for "http://example.com/locked/member": 1357 If: 1358 () 1360 Note that for the purpose of submitting the lock token the actual 1361 form doesn't matter; what's relevant is that the lock token appears 1362 in the If header, and that the If header itself evaluates to true. 1364 7.6. Write Locks and COPY/MOVE 1366 A COPY method invocation MUST NOT duplicate any write locks active on 1367 the source. However, as previously noted, if the COPY copies the 1368 resource into a collection that is locked with a depth-infinity lock, 1369 then the resource will be added to the lock. 1371 A successful MOVE request on a write locked resource MUST NOT move 1372 the write lock with the resource. However, if there is an existing 1373 lock at the destination, the server MUST add the moved resource to 1374 the destination lock scope. For example, if the MOVE makes the 1375 resource a child of a collection that has a depth-infinity lock, then 1376 the resource will be added to that collection's lock. Additionally, 1377 if a resource with a depth-infinity lock is moved to a destination 1378 that is within the scope of the same lock (e.g., within the URL 1379 namespace tree covered by the lock), the moved resource will again be 1380 a added to the lock. In both these examples, as specified in 1381 Section 7.5, an If header must be submitted containing a lock token 1382 for both the source and destination. 1384 7.7. Refreshing Write Locks 1386 A client MUST NOT submit the same write lock request twice. Note 1387 that a client is always aware it is resubmitting the same lock 1388 request because it must include the lock token in the If header in 1389 order to make the request for a resource that is already locked. 1391 However, a client may submit a LOCK request with an If header but 1392 without a body. A server receiving a LOCK request with no body MUST 1393 NOT create a new lock -- this form of the LOCK request is only to be 1394 used to "refresh" an existing lock (meaning, at minimum, that any 1395 timers associated with the lock MUST be re-set). 1397 Clients may submit Timeout headers of arbitrary value with their lock 1398 refresh requests. Servers, as always, may ignore Timeout headers 1399 submitted by the client, and a server MAY refresh a lock with a 1400 timeout period that is different than the previous timeout period 1401 used for the lock, provided it advertises the new value in the LOCK 1402 refresh response. 1404 If an error is received in response to a refresh LOCK request the 1405 client MUST NOT assume that the lock was refreshed. 1407 8. General Request and Response Handling 1409 8.1. Precedence in Error Handling 1411 Servers MUST return authorization errors in preference to other 1412 errors. This avoids leaking information about protected resources 1413 (e.g. a client that finds that a hidden resource exists by seeing a 1414 423 Locked response to an anonymous request to the resource). 1416 8.2. Use of XML 1418 In HTTP/1.1, method parameter information was exclusively encoded in 1419 HTTP headers. Unlike HTTP/1.1, WebDAV encodes method parameter 1420 information either in an XML ([REC-XML]) request entity body, or in 1421 an HTTP header. The use of XML to encode method parameters was 1422 motivated by the ability to add extra XML elements to existing 1423 structures, providing extensibility; and by XML's ability to encode 1424 information in ISO 10646 character sets, providing 1425 internationalization support. 1427 In addition to encoding method parameters, XML is used in WebDAV to 1428 encode the responses from methods, providing the extensibility and 1429 internationalization advantages of XML for method output, as well as 1430 input. 1432 When XML is used for a request or response body, the Content-Type 1433 type SHOULD be application/xml. Implementations MUST accept both 1434 text/xml and application/xml in request and response bodies. Use of 1435 text/xml is deprecated. 1437 All DAV compliant clients and resources MUST use XML parsers that are 1438 compliant with [REC-XML] and [REC-XML-NAMES]. All XML used in either 1439 requests or responses MUST be, at minimum, well formed and use 1440 namespaces correctly. If a server receives XML that is not well- 1441 formed then the server MUST reject the entire request with a 400 (Bad 1442 Request). If a client receives XML that is not well-formed in a 1443 response then the client MUST NOT assume anything about the outcome 1444 of the executed method and SHOULD treat the server as malfunctioning. 1446 Note that processing XML submitted by an untrusted source may cause 1447 risks connected to privacy, security, and service quality (see 1448 Section 20). Servers MAY reject questionable requests (even though 1449 they consist of well-formed XML), for instance with a 400 (Bad 1450 Request) status code and an optional response body explaining the 1451 problem. 1453 8.3. URL Handling 1455 URLs appear in many places in requests and responses. 1456 Interoperability experience with [RFC2518] showed that many clients 1457 parsing Multi-Status responses did not fully implement the full 1458 Reference Resolution defined in Section 5 of [RFC3986]. Thus, 1459 servers in particular need to be careful in handling URLs in 1460 responses, to ensure that clients have enough context to be able to 1461 interpret all the URLs. The rules in this section apply not only to 1462 resource URLs in the 'href' element in Multi-Status responses, but 1463 also to the Destination and If header resource URLs. 1465 The sender has a choice between two approaches: using a relative 1466 reference, which is resolved against the Request-URI, or a full URI. 1467 A server MUST ensure that every 'href' value within a Multi-Status 1468 response uses the same format. 1470 WebDAV only uses one form of relative reference in its extensions, 1471 the absolute path. 1473 Simple-ref = absolute-URI | ( path-absolute [ "?" query ] ) 1475 The absolute-URI, path-absolute and query productions are defined in 1476 Section 4.3, 3.3 and 3.4 of [RFC3986]. 1478 Within Simple-ref productions, senders MUST NOT: 1480 o use dot-segments ("." or ".."), or 1482 o have prefixes that do not match the Request-URI (using the 1483 comparison rules defined in Section 3.2.3 of [RFC2616]). 1485 Identifiers for collections SHOULD end in a '/' character. 1487 8.3.1. Example - Correct URL Handling 1489 Consider the collection http://example.com/sample/ with the internal 1490 member URL http://example.com/sample/a%20test and the PROPFIND 1491 request below: 1493 >>Request: 1495 PROPFIND /sample/ HTTP/1.1 1496 Host: example.com 1497 Depth: 1 1499 In this case, the server should return two 'href' elements containing 1500 either 1501 o 'http://example.com/sample/' and 1502 'http://example.com/sample/a%20test', or 1504 o '/sample/' and '/sample/a%20test' 1506 Note that even though the server may be storing the member resource 1507 internally as 'a test', it has to be percent-encoded when used inside 1508 a URI reference (see Section 2.1 of [RFC3986]). Also note that a 1509 legal URI may still contain characters that need to be escaped within 1510 XML character data, such as the ampersand character. 1512 8.4. Required Bodies in Requests 1514 Some of these new methods do not define bodies. Servers MUST examine 1515 all requests for a body, even when a body was not expected. In cases 1516 where a request body is present but would be ignored by a server, the 1517 server MUST reject the request with 415 (Unsupported Media Type). 1518 This informs the client (which may have been attempting to use an 1519 extension) that the body could not be processed as the client 1520 intended. 1522 8.5. HTTP Headers for use in WebDAV 1524 HTTP defines many headers that can be used in WebDAV requests and 1525 responses. Not all of these are appropriate in all situations and 1526 some interactions may be undefined. Note that HTTP 1.1 requires the 1527 Date header in all responses if possible (see Section 14.18, 1528 [RFC2616]). 1530 The server MUST do authorization checks before checking any HTTP 1531 conditional header. 1533 8.6. ETag 1535 HTTP 1.1 recommends the use of ETags rather than modification dates, 1536 for cache-control, and there are even stronger reasons to prefer 1537 ETags for authoring. Correct use of ETags is even more important in 1538 a distributed authoring environment, because ETags are necessary 1539 along with locks to avoid the lost-update problem. A client might 1540 fail to renew a lock, for example when the lock times out and the 1541 client is accidentally offline or in the middle of a long upload. 1542 When a client fails to renew the lock, it's quite possible the 1543 resource can still be relocked and the user can go on editing, as 1544 long as no changes were made in the meantime. ETags are required for 1545 the client to be able to distinguish this case. Otherwise, the 1546 client is forced to ask the user whether to overwrite the resource on 1547 the server without even being able to tell the user whether it has 1548 changed. Timestamps do not solve this problem nearly as well as 1549 ETags. 1551 Strong ETags are much more useful for authoring use cases than weak 1552 ETags (see Section 13.3.3 of [RFC2616]). Semantic equivalence can be 1553 a useful concept but that depends on the document type and the 1554 application type, and interoperability might require some agreement 1555 or standard outside the scope of this specification and HTTP. Note 1556 also that weak ETags have certain restrictions in HTTP, e.g. these 1557 cannot be used in If-Match headers. 1559 Note that the meaning of an ETag in a PUT response is not clearly 1560 defined either in this document or in RFC2616 (i.e., whether the ETag 1561 means that the resource is octet-for-octet equivalent to the body of 1562 the PUT request, or whether the server could have made minor changes 1563 in the formatting or content of the document upon storage). This is 1564 an HTTP issue, not purely a WebDAV issue. 1566 Because clients may be forced to prompt users or throw away changed 1567 content if the ETag changes, a WebDAV server SHOULD NOT change the 1568 ETag (or the Last-Modified time) for a resource that has an unchanged 1569 body and location. The ETag represents the state of the body or 1570 contents of the resource. There is no similar way to tell if 1571 properties have changed. 1573 8.7. Including Error Response Bodies 1575 HTTP and WebDAV did not use the bodies of most error responses for 1576 machine-parsable information until the specification for Versioning 1577 Extensions to WebDAV introduced a mechanism to include more specific 1578 information in the body of an error response (Section 1.6 of 1579 [RFC3253]). The error body mechanism is appropriate to use with any 1580 error response that may take a body but does not already have a body 1581 defined. The mechanism is particularly appropriate when a status 1582 code can mean many things (for example, 400 Bad Request can mean 1583 required headers are missing, headers are incorrectly formatted, or 1584 much more). This error body mechanism is covered in Section 16. 1586 8.8. Impact of Namespace Operations on Cache Validators 1588 Note that the HTTP response headers "Etag" and "Last-Modified" (see 1589 [RFC2616], Sections 14.19 and 14.29) are defined per URL (not per 1590 resource), and are used by clients for caching. Therefore servers 1591 must ensure that executing any operation that affects the URL 1592 namespace (such as COPY, MOVE, DELETE, PUT or MKCOL) does preserve 1593 their semantics, in particular: 1595 o For any given URL, the "Last-Modified" value MUST increment every 1596 time the representation returned upon GET changes (within the 1597 limits of timestamp resolution). 1599 o For any given URL, an "ETag" value MUST NOT be re-used for 1600 different representations returned by GET. 1602 In practice this means that servers 1604 o might have to increment "Last-Modified" timestamps for every 1605 resource inside the destination namespace of a namespace operation 1606 unless it can do so more selectively, and 1608 o similarily, might have to re-assign "ETag" values for these 1609 resources (unless the server allocates entity tags in a way so 1610 that they are unique across the whole URL namespace managed by the 1611 server). 1613 Note that these considerations also apply to specific use cases, such 1614 as using PUT to create a new resource at a URL that has been mapped 1615 before, but has been deleted since then. 1617 Finally, WebDAV properties (such as DAV:getetag and DAV: 1618 getlastmodified) that inherit their semantics from HTTP headers must 1619 behave accordingly. 1621 9. HTTP Methods for Distributed Authoring 1623 9.1. PROPFIND Method 1625 The PROPFIND method retrieves properties defined on the resource 1626 identified by the Request-URI, if the resource does not have any 1627 internal members, or on the resource identified by the Request-URI 1628 and potentially its member resources, if the resource is a collection 1629 that has internal member URLs. All DAV compliant resources MUST 1630 support the PROPFIND method and the propfind XML element 1631 (Section 14.20) along with all XML elements defined for use with that 1632 element. 1634 A client MUST submit a Depth header with a value of "0", "1", or 1635 "infinity" with a PROPFIND request. Servers MUST support "0" and "1" 1636 depth requests on WebDAV-compliant resources and SHOULD support 1637 "infinity" requests. In practice, support for infinite depth 1638 requests MAY be disabled, due to the performance and security 1639 concerns associated with this behavior. Since clients weren't 1640 required to include the Depth header in [RFC2518], servers SHOULD 1641 treat such a request as if a "Depth: infinity" header was included. 1643 A client may submit a 'propfind' XML element in the body of the 1644 request method describing what information is being requested. It is 1645 possible to: 1647 o Request particular property values, by naming the properties 1648 desired within the 'prop' element (the ordering of properties in 1649 here MAY be ignored by server), 1651 o Request property values for those properties defined in this 1652 specification (at a minimum) plus dead properties, by using the 1653 'allprop' element (the 'include' element can be used with 1654 'allprop' to instruct the server to also include additional live 1655 properties that may not have been returned otherwise), 1657 o Request a list of names of all the properties defined on the 1658 resource, by using the 'propname' element. 1660 A client may choose not to submit a request body. An empty PROPFIND 1661 request body MUST be treated as if it were an 'allprop' request. 1663 Note that 'allprop' does not return values for all live properties. 1664 WebDAV servers increasingly have expensively-calculated or lengthy 1665 properties (see [RFC3253] and [RFC3744]) and do not return all 1666 properties already. Instead, WebDAV clients can use propname 1667 requests to discover what live properties exist, and request named 1668 properties when retrieving values. For a live property defined 1669 elsewhere, that definition can specify whether that live property 1670 would be returned in 'allprop' requests or not. 1672 All servers MUST support returning a response of content type text/ 1673 xml or application/xml that contains a multistatus XML element that 1674 describes the results of the attempts to retrieve the various 1675 properties. 1677 If there is an error retrieving a property then a proper error result 1678 MUST be included in the response. A request to retrieve the value of 1679 a property which does not exist is an error and MUST be noted with a 1680 'response' XML element which contains a 404 (Not Found) status value. 1682 Consequently, the 'multistatus' XML element for a collection resource 1683 MUST include a 'response' XML element for each member URL of the 1684 collection, to whatever depth was requested. It SHOULD NOT include 1685 any 'response' elements for resources that are not WebDAV-compliant. 1686 Each 'response' element MUST contain an 'href' element that contains 1687 the URL of the resource on which the properties in the prop XML 1688 element are defined. Results for a PROPFIND on a collection resource 1689 are returned as a flat list whose order of entries is not 1690 significant. Note that a resource may have only one value for a 1691 property of a given name, so the property may only show up once in 1692 PROPFIND responses. 1694 Properties may be subject to access control. In the case of 1695 'allprop' and 'propname' requests, if a principal does not have the 1696 right to know whether a particular property exists then the property 1697 MAY be silently excluded from the response. 1699 Some PROPFIND results MAY be cached, with care as there is no cache 1700 validation mechanism for most properties. This method is both safe 1701 and idempotent (see Section 9.1 of [RFC2616]). 1703 9.1.1. PROPFIND Status Codes 1705 This section, as with similar sections for other methods, provides 1706 some guidance on error codes and preconditions or postconditions 1707 (defined in Section 16) that might be particularly useful with 1708 PROPFIND. 1710 403 Forbidden - A server MAY reject PROPFIND requests on collections 1711 with depth header of "Infinity", in which case it SHOULD use this 1712 error with the precondition code 'propfind-finite-depth' inside the 1713 error body. 1715 9.1.2. Status Codes for Use in 'propstat' Element 1717 In PROPFIND responses, information about individual properties is 1718 returned inside 'propstat' elements (see Section 14.22), each 1719 containing an individual 'status' element containing information 1720 about the properties appearing in it. The list below summarizes the 1721 most common status codes used inside 'propstat', however clients 1722 should be prepared to handle other 2/3/4/5xx series status codes as 1723 well. 1725 200 OK - A property exists and/or its value is successfully returned. 1727 401 Unauthorized - The property cannot be viewed without appropriate 1728 authorization. 1730 403 Forbidden - The property cannot be viewed regardless of 1731 authentication. 1733 404 Not Found - The property does not exist. 1735 9.1.3. Example - Retrieving Named Properties 1737 >>Request 1739 PROPFIND /file HTTP/1.1 1740 Host: www.example.com 1741 Content-type: application/xml; charset="utf-8" 1742 Content-Length: xxxx 1744 1745 1746 1747 1748 1749 1750 1751 1752 1754 >>Response 1756 HTTP/1.1 207 Multi-Status 1757 Content-Type: application/xml; charset="utf-8" 1758 Content-Length: xxxx 1760 1761 1762 1763 http://www.example.com/file 1764 1765 1766 1767 Box type A 1768 1769 1770 J.J. Johnson 1771 1772 1773 HTTP/1.1 200 OK 1774 1775 1776 1777 HTTP/1.1 403 Forbidden 1778 The user does not have access to the 1779 DingALing property. 1780 1781 1782 1783 There has been an access violation error. 1784 1785 1787 In this example, PROPFIND is executed on a non-collection resource 1788 http://www.example.com/file. The propfind XML element specifies the 1789 name of four properties whose values are being requested. In this 1790 case only two properties were returned, since the principal issuing 1791 the request did not have sufficient access rights to see the third 1792 and fourth properties. 1794 9.1.4. Example - Using 'propname' to Retrieve All Property Names 1796 >>Request 1798 PROPFIND /container/ HTTP/1.1 1799 Host: www.example.com 1800 Content-Type: application/xml; charset="utf-8" 1801 Content-Length: xxxx 1803 1804 1805 1806 1808 >>Response 1810 HTTP/1.1 207 Multi-Status 1811 Content-Type: application/xml; charset="utf-8" 1812 Content-Length: xxxx 1814 1815 1816 1817 http://www.example.com/container/ 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 HTTP/1.1 200 OK 1828 1829 1830 1831 http://www.example.com/container/front.html 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 HTTP/1.1 200 OK 1845 1846 1847 1849 In this example, PROPFIND is invoked on the collection resource 1850 http://www.example.com/container/, with a propfind XML element 1851 containing the propname XML element, meaning the name of all 1852 properties should be returned. Since no Depth header is present, it 1853 assumes its default value of "infinity", meaning the name of the 1854 properties on the collection and all its descendents should be 1855 returned. 1857 Consistent with the previous example, resource 1858 http://www.example.com/container/ has six properties defined on it: 1859 bigbox and author in the "http://ns.example.com/boxschema/" 1860 namespace, and creationdate, displayname, resourcetype, and 1861 supportedlock in the "DAV:" namespace. 1863 The resource http://www.example.com/container/index.html, a member of 1864 the "container" collection, has nine properties defined on it, bigbox 1865 in the "http://ns.example.com/boxschema/" namespace and, 1866 creationdate, displayname, getcontentlength, getcontenttype, getetag, 1867 getlastmodified, resourcetype, and supportedlock in the "DAV:" 1868 namespace. 1870 This example also demonstrates the use of XML namespace scoping and 1871 the default namespace. Since the "xmlns" attribute does not contain 1872 a prefix, the namespace applies by default to all enclosed elements. 1873 Hence, all elements which do not explicitly state the namespace to 1874 which they belong are members of the "DAV:" namespace. 1876 9.1.5. Example - Using So-called 'allprop' 1878 Note that 'allprop', despite its name which remains for backward- 1879 compatibility, does not return every property, but only dead 1880 properties and the live properties defined in this specification. 1882 >>Request 1884 PROPFIND /container/ HTTP/1.1 1885 Host: www.example.com 1886 Depth: 1 1887 Content-Type: application/xml; charset="utf-8" 1888 Content-Length: xxxx 1890 1891 1892 1893 1895 >>Response 1897 HTTP/1.1 207 Multi-Status 1898 Content-Type: application/xml; charset="utf-8" 1899 Content-Length: xxxx 1901 1902 1903 1904 /container/ 1905 1906 1907 Box type A 1908 Hadrian 1909 1997-12-01T17:42:21-08:00 1910 Example collection 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 HTTP/1.1 200 OK 1924 1925 1926 1927 /container/front.html 1928 1929 1930 Box type B 1931 1932 1997-12-01T18:27:21-08:00 1933 Example HTML resource 1934 4525 1935 text/html 1936 "zzyzx" 1937 Mon, 12 Jan 1998 09:25:56 GMT 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 HTTP/1.1 200 OK 1953 1954 1955 1957 In this example, PROPFIND was invoked on the resource 1958 http://www.example.com/container/ with a Depth header of 1, meaning 1959 the request applies to the resource and its children, and a propfind 1960 XML element containing the allprop XML element, meaning the request 1961 should return the name and value of all the dead properties defined 1962 on the resources, plus the name and value of all the properties 1963 defined in this specification. This example illustrates the use of 1964 relative references in the 'href' elements of the response. 1966 The resource http://www.example.com/container/ has six properties 1967 defined on it: 'bigbox' and 'author in the 1968 "http://ns.example.com/boxschema/" namespace, DAV:creationdate, DAV: 1969 displayname, DAV:resourcetype, and DAV:supportedlock. 1971 The last four properties are WebDAV-specific, defined in Section 15. 1972 Since GET is not supported on this resource, the get* properties 1973 (e.g., DAV:getcontentlength) are not defined on this resource. The 1974 WebDAV-specific properties assert that "container" was created on 1975 December 1, 1997, at 5:42:21PM, in a time zone 8 hours west of GMT 1976 (DAV:creationdate), has a name of "Example collection" (DAV: 1977 displayname), a collection resource type (DAV:resourcetype), and 1978 supports exclusive write and shared write locks (DAV:supportedlock). 1980 The resource http://www.example.com/container/front.html has nine 1981 properties defined on it: 1983 'bigbox' in the "http://ns.example.com/boxschema/" namespace (another 1984 instance of the "bigbox" property type), DAV:creationdate, DAV: 1985 displayname, DAV:getcontentlength, DAV:getcontenttype, DAV:getetag, 1986 DAV:getlastmodified, DAV:resourcetype, and DAV:supportedlock. 1988 The DAV-specific properties assert that "front.html" was created on 1989 December 1, 1997, at 6:27:21PM, in a time zone 8 hours west of GMT 1990 (DAV:creationdate), has a name of "Example HTML resource" (DAV: 1991 displayname), a content length of 4525 bytes (DAV:getcontentlength), 1992 a MIME type of "text/html" (DAV:getcontenttype), an entity tag of 1993 "zzyzx" (DAV:getetag), was last modified on Monday, January 12, 1998, 1994 at 09:25:56 GMT (DAV:getlastmodified), has an empty resource type, 1995 meaning that it is not a collection (DAV:resourcetype), and supports 1996 both exclusive write and shared write locks (DAV:supportedlock). 1998 9.1.6. Example - Using 'allprop' with 'include' 2000 >>Request 2002 PROPFIND /mycol/ HTTP/1.1 2003 Host: www.example.com 2004 Depth: 1 2005 Content-Type: application/xml; charset="utf-8" 2006 Content-Length: xxxx 2008 2009 2010 2011 2012 2013 2014 2015 2017 In this example, PROPFIND is executed on the resource 2018 http://www.example.com/mycol/ and its internal member resources. The 2019 client requests the values of all live properties defined in this 2020 specification, plus all dead properties, plus two more live 2021 properties defined in [RFC3253]. The response is not shown. 2023 9.2. PROPPATCH Method 2025 The PROPPATCH method processes instructions specified in the request 2026 body to set and/or remove properties defined on the resource 2027 identified by the Request-URI. 2029 All DAV compliant resources MUST support the PROPPATCH method and 2030 MUST process instructions that are specified using the 2031 propertyupdate, set, and remove XML elements. Execution of the 2032 directives in this method is, of course, subject to access control 2033 constraints. DAV compliant resources SHOULD support the setting of 2034 arbitrary dead properties. 2036 The request message body of a PROPPATCH method MUST contain the 2037 propertyupdate XML element. 2039 Servers MUST process PROPPATCH instructions in document order (an 2040 exception to the normal rule that ordering is irrelevant). 2041 Instructions MUST either all be executed or none executed. Thus if 2042 any error occurs during processing all executed instructions MUST be 2043 undone and a proper error result returned. Instruction processing 2044 details can be found in the definition of the set and remove 2045 instructions in Section 14.23 and Section 14.26. 2047 If a server attempts to make any of the property changes in a 2048 PROPPATCH request (i.e. the request is not rejected for high-level 2049 errors before processing the body), the response MUST be a Multi- 2050 Status response as described in Section 9.2.1. 2052 This method is idempotent, but not safe (see Section 9.1 of 2053 [RFC2616]). Responses to this method MUST NOT be cached. 2055 9.2.1. Status Codes for Use in 'propstat' Element 2057 In PROPPATCH responses, information about individual properties is 2058 returned inside 'propstat' elements (see Section 14.22), each 2059 containing an individual 'status' element containing information 2060 about the properties appearing in it. The list below summarizes the 2061 most common status codes used inside 'propstat', however clients 2062 should be prepared to handle other 2/3/4/5xx series status codes as 2063 well. 2065 200 (OK) - The property set or change succeeded. Note that if this 2066 appears for one property, it appears for every property in the 2067 response, due to the atomicity of PROPPATCH. 2069 403 (Forbidden) - The client, for reasons the server chooses not to 2070 specify, cannot alter one of the properties. 2072 403 (Forbidden): The client has attempted to set a protected 2073 property, such as DAV:getetag. If returning this error, the server 2074 SHOULD use the precondition code 'cannot-modify-protected-property' 2075 inside the response body. 2077 409 (Conflict) - The client has provided a value whose semantics are 2078 not appropriate for the property. 2080 424 (Failed Dependency) - The property change could not be made 2081 because of another property change that failed. 2083 507 (Insufficient Storage) - The server did not have sufficient space 2084 to record the property. 2086 9.2.2. Example - PROPPATCH 2088 >>Request 2090 PROPPATCH /bar.html HTTP/1.1 2091 Host: www.example.com 2092 Content-Type: application/xml; charset="utf-8" 2093 Content-Length: xxxx 2095 2096 2098 2099 2100 2101 Jim Whitehead 2102 Roy Fielding 2103 2104 2105 2106 2107 2108 2109 2111 >>Response 2113 HTTP/1.1 207 Multi-Status 2114 Content-Type: application/xml; charset="utf-8" 2115 Content-Length: xxxx 2117 2118 2120 2121 http://www.example.com/bar.html 2122 2123 2124 HTTP/1.1 424 Failed Dependency 2125 2126 2127 2128 HTTP/1.1 409 Conflict 2129 2130 Copyright Owner can not be deleted or 2131 altered. 2132 2133 2135 In this example, the client requests the server to set the value of 2136 the "Authors" property in the 2137 "http://ns.example.com/standards/z39.50/" namespace, and to remove 2138 the property "Copyright-Owner" in the same namespace. Since the 2139 Copyright-Owner property could not be removed, no property 2140 modifications occur. The 424 (Failed Dependency) status code for the 2141 Authors property indicates this action would have succeeded if it 2142 were not for the conflict with removing the Copyright-Owner property. 2144 9.3. MKCOL Method 2146 MKCOL creates a new collection resource at the location specified by 2147 the Request-URI. If the Request-URI is already mapped to a resource 2148 then the MKCOL MUST fail. During MKCOL processing, a server MUST 2149 make the Request-URI an internal member of its parent collection, 2150 unless the Request-URI is "/". If no such ancestor exists, the 2151 method MUST fail. When the MKCOL operation creates a new collection 2152 resource, all ancestors MUST already exist, or the method MUST fail 2153 with a 409 (Conflict) status code. For example, if a request to 2154 create collection /a/b/c/d/ is made, and /a/b/c/ does not exist, the 2155 request must fail. 2157 When MKCOL is invoked without a request body, the newly created 2158 collection SHOULD have no members. 2160 A MKCOL request message may contain a message body. The precise 2161 behavior of a MKCOL request when the body is present is undefined, 2162 but limited to creating collections, members of a collection, bodies 2163 of members and properties on the collections or members. If the 2164 server receives a MKCOL request entity type it does not support or 2165 understand it MUST respond with a 415 (Unsupported Media Type) status 2166 code. If the server decides to reject the request based on the 2167 presence of an entity or the type of an entity, it should use the 415 2168 (Unsupported Media Type) status code. 2170 This method is idempotent, but not safe (see Section 9.1 of 2171 [RFC2616]). Responses to this method MUST NOT be cached. 2173 9.3.1. MKCOL Status Codes 2175 In addition to the general status codes possible, the following 2176 status codes have specific applicability to MKCOL: 2178 201 (Created) - The collection was created. 2180 403 (Forbidden) - This indicates at least one of two conditions: 1) 2181 the server does not allow the creation of collections at the given 2182 location in its URL namespace, or 2) the parent collection of the 2183 Request-URI exists but cannot accept members. 2185 405 (Method Not Allowed) - MKCOL can only be executed on an unmapped 2186 URL. 2188 409 (Conflict) - A collection cannot be made at the Request-URI until 2189 one or more intermediate collections have been created. The server 2190 MUST NOT create those intermediate collections automatically. 2192 415 (Unsupported Media Type) - The server does not support the 2193 request body type (although bodies are legal on MKCOL requests, since 2194 this specification doesn't define any, the server is likely not to 2195 support any given body type). 2197 507 (Insufficient Storage) - The resource does not have sufficient 2198 space to record the state of the resource after the execution of this 2199 method. 2201 9.3.2. Example - MKCOL 2203 This example creates a collection called /webdisc/xfiles/ on the 2204 server www.example.com. 2206 >>Request 2208 MKCOL /webdisc/xfiles/ HTTP/1.1 2209 Host: www.example.com 2211 >>Response 2213 HTTP/1.1 201 Created 2215 9.4. GET, HEAD for Collections 2217 The semantics of GET are unchanged when applied to a collection, 2218 since GET is defined as, "retrieve whatever information (in the form 2219 of an entity) is identified by the Request-URI" [RFC2616]. GET when 2220 applied to a collection may return the contents of an "index.html" 2221 resource, a human-readable view of the contents of the collection, or 2222 something else altogether. Hence it is possible that the result of a 2223 GET on a collection will bear no correlation to the membership of the 2224 collection. 2226 Similarly, since the definition of HEAD is a GET without a response 2227 message body, the semantics of HEAD are unmodified when applied to 2228 collection resources. 2230 9.5. POST for Collections 2232 Since by definition the actual function performed by POST is 2233 determined by the server and often depends on the particular 2234 resource, the behavior of POST when applied to collections cannot be 2235 meaningfully modified because it is largely undefined. Thus the 2236 semantics of POST are unmodified when applied to a collection. 2238 9.6. DELETE Requirements 2240 DELETE is defined in [RFC2616], Section 9.7, to "delete the resource 2241 identified by the Request-URI". However, WebDAV changes some DELETE 2242 handling requirements. 2244 A server processing a successful DELETE request: 2246 MUST destroy locks rooted on the deleted resource 2248 MUST remove the mapping from the Request-URI to any resource. 2250 Thus, after a successful DELETE operation (and in the absence of 2251 other actions) a subsequent GET/HEAD/PROPFIND request to the target 2252 Request-URI MUST return 404 (Not Found). 2254 9.6.1. DELETE for Collections 2256 The DELETE method on a collection MUST act as if a "Depth: infinity" 2257 header was used on it. A client MUST NOT submit a Depth header with 2258 a DELETE on a collection with any value but infinity. 2260 DELETE instructs that the collection specified in the Request-URI and 2261 all resources identified by its internal member URLs are to be 2262 deleted. 2264 If any resource identified by a member URL cannot be deleted then all 2265 of the member's ancestors MUST NOT be deleted, so as to maintain URL 2266 namespace consistency. 2268 Any headers included with DELETE MUST be applied in processing every 2269 resource to be deleted. 2271 When the DELETE method has completed processing it MUST result in a 2272 consistent URL namespace. 2274 If an error occurs deleting a member resource (a resource other than 2275 the resource identified in the Request-URI) then the response can be 2276 a 207 (Multi-Status). Multi-Status is used here to indicate which 2277 internal resources could NOT be deleted, including an error code 2278 which should help the client understand which resources caused the 2279 failure. For example, the Multi-Status body could include a response 2280 with status 423 (Locked) if an internal resource was locked. 2282 The server MAY return a 4xx status response, rather than a 207, if 2283 the request failed completely. 2285 424 (Failed Dependency) status codes SHOULD NOT be in the 207 (Multi- 2286 Status) response for DELETE. They can be safely left out because the 2287 client will know that the ancestors of a resource could not be 2288 deleted when the client receives an error for the ancestor's progeny. 2289 Additionally 204 (No Content) errors SHOULD NOT be returned in the 2290 207 (Multi-Status). The reason for this prohibition is that 204 (No 2291 Content) is the default success code. 2293 9.6.2. Example - DELETE 2295 >>Request 2297 DELETE /container/ HTTP/1.1 2298 Host: www.example.com 2300 >>Response 2302 HTTP/1.1 207 Multi-Status 2303 Content-Type: application/xml; charset="utf-8" 2304 Content-Length: xxxx 2306 2307 2308 2309 http://www.example.com/container/resource3 2310 HTTP/1.1 423 Locked 2311 2312 2313 2315 In this example the attempt to delete 2316 http://www.example.com/container/resource3 failed because it is 2317 locked, and no lock token was submitted with the request. 2318 Consequently, the attempt to delete http://www.example.com/container/ 2319 also failed. Thus the client knows that the attempt to delete 2320 http://www.example.com/container/ must have also failed since the 2321 parent can not be deleted unless its child has also been deleted. 2322 Even though a Depth header has not been included, a depth of infinity 2323 is assumed because the method is on a collection. 2325 9.7. PUT Requirements 2327 9.7.1. PUT for Non-Collection Resources 2329 A PUT performed on an existing resource replaces the GET response 2330 entity of the resource. Properties defined on the resource may be 2331 recomputed during PUT processing but are not otherwise affected. For 2332 example, if a server recognizes the content type of the request body, 2333 it may be able to automatically extract information that could be 2334 profitably exposed as properties. 2336 A PUT that would result in the creation of a resource without an 2337 appropriately scoped parent collection MUST fail with a 409 2338 (Conflict). 2340 A PUT request allows a client to indicate what media type an entity 2341 body has, and whether it should change if overwritten. Thus, a 2342 client SHOULD provide a Content-Type for a new resource if any is 2343 known. If the client does not provide a Content-Type for a new 2344 resource, the server MAY create a resource with no Content-Type 2345 assigned, or it MAY attempt to assign a Content-Type. 2347 Note that although a recipient ought generally to treat metadata 2348 supplied with an HTTP request as authoritative, in practice there's 2349 no guarantee that a server will accept client-supplied metadata (e.g. 2350 any request header beginning with "Content-"). Many servers do not 2351 allow configuring the Content-Type on a per-resource basis in the 2352 first place. Thus, clients can't always rely on the ability to 2353 directly influence the content type by including a Content-Type 2354 request header. 2356 9.7.2. PUT for Collections 2358 This specification does not define the behavior of the PUT method for 2359 existing collections. A PUT request to an existing collection MAY be 2360 treated as an error (405 Method Not Allowed). 2362 The MKCOL method is defined to create collections. 2364 9.8. COPY Method 2366 The COPY method creates a duplicate of the source resource identified 2367 by the Request-URI, in the destination resource identified by the URI 2368 in the Destination header. The Destination header MUST be present. 2369 The exact behavior of the COPY method depends on the type of the 2370 source resource. 2372 All WebDAV compliant resources MUST support the COPY method. 2373 However, support for the COPY method does not guarantee the ability 2374 to copy a resource. For example, separate programs may control 2375 resources on the same server. As a result, it may not be possible to 2376 copy a resource to a location that appears to be on the same server. 2378 This method is idempotent, but not safe (see Section 9.1 of 2379 [RFC2616]). Responses to this method MUST NOT be cached. 2381 9.8.1. COPY for Non-collection Resources 2383 When the source resource is not a collection the result of the COPY 2384 method is the creation of a new resource at the destination whose 2385 state and behavior match that of the source resource as closely as 2386 possible. Since the environment at the destination may be different 2387 than at the source due to factors outside the scope of control of the 2388 server, such as the absence of resources required for correct 2389 operation, it may not be possible to completely duplicate the 2390 behavior of the resource at the destination. Subsequent alterations 2391 to the destination resource will not modify the source resource. 2392 Subsequent alterations to the source resource will not modify the 2393 destination resource. 2395 9.8.2. COPY for Properties 2397 After a successful COPY invocation, all dead properties on the source 2398 resource SHOULD be duplicated on the destination resource. Live 2399 properties described in this document SHOULD be duplicated as 2400 identically behaving live properties at the destination resource, but 2401 not necessarily with the same values. Servers SHOULD NOT convert 2402 live properties into dead properties on the destination resource, 2403 because clients may then draw incorrect conclusions about the state 2404 or functionality of a resource. Note that some live properties are 2405 defined such that the absence of the property has a specific meaning 2406 (e.g. a flag with one meaning if present and the opposite if absent), 2407 and in these cases, a successful COPY might result in the property 2408 being reported as "Not Found" in subsequent requests. 2410 When the destination is an unmapped URL, a COPY operation creates a 2411 new resource much like a PUT operation does. Live properties which 2412 are related to resource creation (such as DAV:creationdate) should 2413 have their values set accordingly. 2415 9.8.3. COPY for Collections 2417 The COPY method on a collection without a Depth header MUST act as if 2418 a Depth header with value "infinity" was included. A client may 2419 submit a Depth header on a COPY on a collection with a value of "0" 2420 or "infinity". Servers MUST support the "0" and "infinity" Depth 2421 header behaviors on WebDAV-compliant resources. 2423 An infinite depth COPY instructs that the collection resource 2424 identified by the Request-URI is to be copied to the location 2425 identified by the URI in the Destination header, and all its internal 2426 member resources are to be copied to a location relative to it, 2427 recursively through all levels of the collection hierarchy. Note 2428 that an infinite depth COPY of /A/ into /A/B/ could lead to infinite 2429 recursion if not handled correctly. 2431 A COPY of "Depth: 0" only instructs that the collection and its 2432 properties but not resources identified by its internal member URLs, 2433 are to be copied. 2435 Any headers included with a COPY MUST be applied in processing every 2436 resource to be copied with the exception of the Destination header. 2438 The Destination header only specifies the destination URI for the 2439 Request-URI. When applied to members of the collection identified by 2440 the Request-URI the value of Destination is to be modified to reflect 2441 the current location in the hierarchy. So, if the Request-URI is /a/ 2442 with Host header value http://example.com/ and the Destination is 2443 http://example.com/b/ then when http://example.com/a/c/d is processed 2444 it must use a Destination of http://example.com/b/c/d. 2446 When the COPY method has completed processing it MUST have created a 2447 consistent URL namespace at the destination (see Section 5.1 for the 2448 definition of namespace consistency). However, if an error occurs 2449 while copying an internal collection, the server MUST NOT copy any 2450 resources identified by members of this collection (i.e., the server 2451 must skip this subtree), as this would create an inconsistent 2452 namespace. After detecting an error, the COPY operation SHOULD try 2453 to finish as much of the original copy operation as possible (i.e., 2454 the server should still attempt to copy other subtrees and their 2455 members, that are not descendents of an error-causing collection). 2457 So, for example, if an infinite depth copy operation is performed on 2458 collection /a/, which contains collections /a/b/ and /a/c/, and an 2459 error occurs copying /a/b/, an attempt should still be made to copy 2460 /a/c/. Similarly, after encountering an error copying a non- 2461 collection resource as part of an infinite depth copy, the server 2462 SHOULD try to finish as much of the original copy operation as 2463 possible. 2465 If an error in executing the COPY method occurs with a resource other 2466 than the resource identified in the Request-URI then the response 2467 MUST be a 207 (Multi-Status), and the URL of the resource causing the 2468 failure MUST appear with the specific error. 2470 The 424 (Failed Dependency) status code SHOULD NOT be returned in the 2471 207 (Multi-Status) response from a COPY method. These responses can 2472 be safely omitted because the client will know that the progeny of a 2473 resource could not be copied when the client receives an error for 2474 the parent. Additionally 201 (Created)/204 (No Content) status codes 2475 SHOULD NOT be returned as values in 207 (Multi-Status) responses from 2476 COPY methods. They, too, can be safely omitted because they are the 2477 default success codes. 2479 9.8.4. COPY and Overwriting Destination Resources 2481 If a COPY request has an Overwrite header with a value of "F", and a 2482 resource exists at the Destination URL, the server MUST fail the 2483 request. 2485 When a server executes a COPY request and overwrites a destination 2486 resource, the exact behavior MAY depend on many factors, including 2487 WebDAV extension capabilities (see particularly [RFC3253]). For 2488 example, when an ordinary resource is overwritten, the server could 2489 delete the target resource before doing the copy, or could do an in- 2490 place overwrite to preserve live properties. 2492 When a collection is overwritten, the membership of the destination 2493 collection after the successful COPY request MUST be the same 2494 membership as the source collection immediately before the COPY. 2495 Thus, merging the membership of the source and destination 2496 collections together in the destination is not a compliant behavior. 2498 In general, if clients require the state of the destination URL to be 2499 wiped out prior to a COPY (e.g. to force live properties to be 2500 reset), then the client could send a DELETE to the destination before 2501 the COPY request to ensure this reset. 2503 9.8.5. Status Codes 2505 In addition to the general status codes possible, the following 2506 status codes have specific applicability to COPY: 2508 201 (Created) - The source resource was successfully copied. The 2509 COPY operation resulted in the creation of a new resource. 2511 204 (No Content) - The source resource was successfully copied to a 2512 pre-existing destination resource. 2514 207 (Multi-Status) - Multiple resources were to be affected by the 2515 COPY, but errors on some of them prevented the operation from taking 2516 place. Specific error messages, together with the most appropriate 2517 of the source and destination URLs, appear in the body of the multi- 2518 status response. E.g. if a destination resource was locked and could 2519 not be overwritten, then the destination resource URL appears with 2520 the 423 (Locked) status. 2522 403 (Forbidden) - The operation is forbidden. A special case for 2523 COPY could be that the source and destination resources are the same 2524 resource. 2526 409 (Conflict) - A resource cannot be created at the destination 2527 until one or more intermediate collections have been created. The 2528 server MUST NOT create those intermediate collections automatically. 2530 412 (Precondition Failed) - A precondition header check failed, e.g. 2531 the Overwrite header is "F" and the destination URL is already mapped 2532 to a resource. 2534 423 (Locked) - The destination resource, or resource within the 2535 destination collection, was locked. This response SHOULD contain the 2536 'lock-token-submitted' precondition element. 2538 502 (Bad Gateway) - This may occur when the destination is on another 2539 server, repository or URL namespace. Either the source namespace 2540 does not support copying to the destination namespace, or the 2541 destination namespace refuses to accept the resource. The client may 2542 wish to try GET/PUT and PROPFIND/PROPPATCH instead. 2544 507 (Insufficient Storage) - The destination resource does not have 2545 sufficient space to record the state of the resource after the 2546 execution of this method. 2548 9.8.6. Example - COPY with Overwrite 2550 This example shows resource 2551 http://www.example.com/~fielding/index.html being copied to the 2552 location http://www.example.com/users/f/fielding/index.html. The 204 2553 (No Content) status code indicates the existing resource at the 2554 destination was overwritten. 2556 >>Request 2558 COPY /~fielding/index.html HTTP/1.1 2559 Host: www.example.com 2560 Destination: http://www.example.com/users/f/fielding/index.html 2562 >>Response 2564 HTTP/1.1 204 No Content 2566 9.8.7. Example - COPY with No Overwrite 2568 The following example shows the same copy operation being performed, 2569 but with the Overwrite header set to "F." A response of 412 2570 (Precondition Failed) is returned because the destination URL is 2571 already mapped to a resource. 2573 >>Request 2575 COPY /~fielding/index.html HTTP/1.1 2576 Host: www.example.com 2577 Destination: http://www.example.com/users/f/fielding/index.html 2578 Overwrite: F 2580 >>Response 2582 HTTP/1.1 412 Precondition Failed 2584 9.8.8. Example - COPY of a Collection 2586 >>Request 2588 COPY /container/ HTTP/1.1 2589 Host: www.example.com 2590 Destination: http://www.example.com/othercontainer/ 2591 Depth: infinity 2593 >>Response 2595 HTTP/1.1 207 Multi-Status 2596 Content-Type: application/xml; charset="utf-8" 2597 Content-Length: xxxx 2599 2601 2602 2603 http://www.example.com/othercontainer/R2/ 2604 HTTP/1.1 423 Locked 2605 2606 2607 2609 The Depth header is unnecessary as the default behavior of COPY on a 2610 collection is to act as if a "Depth: infinity" header had been 2611 submitted. In this example most of the resources, along with the 2612 collection, were copied successfully. However the collection R2 2613 failed because the destination R2 is locked. Because there was an 2614 error copying R2, none of R2's members were copied. However no 2615 errors were listed for those members due to the error minimization 2616 rules. 2618 9.9. MOVE Method 2620 The MOVE operation on a non-collection resource is the logical 2621 equivalent of a copy (COPY), followed by consistency maintenance 2622 processing, followed by a delete of the source, where all three 2623 actions are performed in a single operation. The consistency 2624 maintenance step allows the server to perform updates caused by the 2625 move, such as updating all URLs other than the Request-URI which 2626 identify the source resource, to point to the new destination 2627 resource. 2629 The Destination header MUST be present on all MOVE methods and MUST 2630 follow all COPY requirements for the COPY part of the MOVE method. 2631 All WebDAV compliant resources MUST support the MOVE method. 2633 Support for the MOVE method does not guarantee the ability to move a 2634 resource to a particular destination. For example, separate programs 2635 may actually control different sets of resources on the same server. 2636 Therefore, it may not be possible to move a resource within a 2637 namespace that appears to belong to the same server. 2639 If a resource exists at the destination, the destination resource 2640 will be deleted as a side-effect of the MOVE operation, subject to 2641 the restrictions of the Overwrite header. 2643 This method is idempotent, but not safe (see Section 9.1 of 2644 [RFC2616]). Responses to this method MUST NOT be cached. 2646 9.9.1. MOVE for Properties 2648 Live properties described in this document SHOULD be moved along with 2649 the resource, such that the resource has identically behaving live 2650 properties at the destination resource, but not necessarily with the 2651 same values. Note that some live properties are defined such that 2652 the absence of the property has a specific meaning (e.g. a flag with 2653 one meaning if present and the opposite if absent), and in these 2654 cases, a successful MOVE might result in the property being reported 2655 as "Not Found" in subsequent requests. If the live properties will 2656 not work the same way at the destination, the server MAY fail the 2657 request. 2659 MOVE is frequently used by clients to rename a file without changing 2660 its parent collection, so it's not appropriate to reset all live 2661 properties which are set at resource creation. For example, the DAV: 2662 creationdate property value SHOULD remain the same after a MOVE. 2664 Dead properties MUST be moved along with the resource. 2666 9.9.2. MOVE for Collections 2668 A MOVE with "Depth: infinity" instructs that the collection 2669 identified by the Request-URI be moved to the address specified in 2670 the Destination header, and all resources identified by its internal 2671 member URLs are to be moved to locations relative to it, recursively 2672 through all levels of the collection hierarchy. 2674 The MOVE method on a collection MUST act as if a "Depth: infinity" 2675 header was used on it. A client MUST NOT submit a Depth header on a 2676 MOVE on a collection with any value but "infinity". 2678 Any headers included with MOVE MUST be applied in processing every 2679 resource to be moved with the exception of the Destination header. 2680 The behavior of the Destination header is the same as given for COPY 2681 on collections. 2683 When the MOVE method has completed processing it MUST have created a 2684 consistent URL namespace at both the source and destination (see 2685 section 5.1 for the definition of namespace consistency). However, 2686 if an error occurs while moving an internal collection, the server 2687 MUST NOT move any resources identified by members of the failed 2688 collection (i.e., the server must skip the error-causing subtree), as 2689 this would create an inconsistent namespace. In this case, after 2690 detecting the error, the move operation SHOULD try to finish as much 2691 of the original move as possible (i.e., the server should still 2692 attempt to move other subtrees and the resources identified by their 2693 members, that are not descendents of an error-causing collection). 2694 So, for example, if an infinite depth move is performed on collection 2695 /a/, which contains collections /a/b/ and /a/c/, and an error occurs 2696 moving /a/b/, an attempt should still be made to try moving /a/c/. 2697 Similarly, after encountering an error moving a non-collection 2698 resource as part of an infinite depth move, the server SHOULD try to 2699 finish as much of the original move operation as possible. 2701 If an error occurs with a resource other than the resource identified 2702 in the Request-URI then the response MUST be a 207 (Multi-Status), 2703 and the errored resource's URL MUST appear with the specific error. 2705 The 424 (Failed Dependency) status code SHOULD NOT be returned in the 2706 207 (Multi-Status) response from a MOVE method. These errors can be 2707 safely omitted because the client will know that the progeny of a 2708 resource could not be moved when the client receives an error for the 2709 parent. Additionally 201 (Created)/204 (No Content) responses SHOULD 2710 NOT be returned as values in 207 (Multi-Status) responses from a 2711 MOVE. These responses can be safely omitted because they are the 2712 default success codes. 2714 9.9.3. MOVE and the Overwrite Header 2716 If a resource exists at the destination and the Overwrite header is 2717 "T" then prior to performing the move the server MUST perform a 2718 DELETE with "Depth: infinity" on the destination resource. If the 2719 Overwrite header is set to "F" then the operation will fail. 2721 9.9.4. Status Codes 2723 In addition to the general status codes possible, the following 2724 status codes have specific applicability to MOVE: 2726 201 (Created) - The source resource was successfully moved, and a new 2727 URL mapping was created at the destination. 2729 204 (No Content) - The source resource was successfully moved to a 2730 URL that was already mapped. 2732 207 (Multi-Status) - Multiple resources were to be affected by the 2733 MOVE, but errors on some of them prevented the operation from taking 2734 place. Specific error messages, together with the most appropriate 2735 of the source and destination URLs, appear in the body of the multi- 2736 status response. E.g. if a source resource was locked and could not 2737 be moved, then the source resource URL appears with the 423 (Locked) 2738 status. 2740 403 (Forbidden) - Among many possible reasons for forbidding a MOVE 2741 operation, this status code is recommended for use when the source 2742 and destination resources are the same. 2744 409 (Conflict) - A resource cannot be created at the destination 2745 until one or more intermediate collections have been created. The 2746 server MUST NOT create those intermediate collections automatically. 2747 Or, the server was unable to preserve the behavior of the live 2748 properties and still move the resource to the destination (see 2749 'preserved-live-properties' postcondition). 2751 412 (Precondition Failed) - A condition header failed. Specific to 2752 MOVE, this could mean that the Overwrite header is "F" and the 2753 destination URL is already mapped to a resource. 2755 423 (Locked) - The source or the destination resource, the source or 2756 destination resource parent, or some resource within the source or 2757 destination collection, was locked. This response SHOULD contain the 2758 'lock-token-submitted' precondition element. 2760 502 (Bad Gateway) - This may occur when the destination is on another 2761 server and the destination server refuses to accept the resource. 2762 This could also occur when the destination is on another sub-section 2763 of the same server namespace. 2765 9.9.5. Example - MOVE of a Non-Collection 2767 This example shows resource 2768 http://www.example.com/~fielding/index.html being moved to the 2769 location http://www.example.com/users/f/fielding/index.html. The 2770 contents of the destination resource would have been overwritten if 2771 the destination URL was already mapped to a resource. In this case, 2772 since there was nothing at the destination resource, the response 2773 code is 201 (Created). 2775 >>Request 2777 MOVE /~fielding/index.html HTTP/1.1 2778 Host: www.example.com 2779 Destination: http://www.example/users/f/fielding/index.html 2781 >>Response 2783 HTTP/1.1 201 Created 2784 Location: http://www.example.com/users/f/fielding/index.html 2786 9.9.6. Example - MOVE of a Collection 2788 >>Request 2790 MOVE /container/ HTTP/1.1 2791 Host: www.example.com 2792 Destination: http://www.example.com/othercontainer/ 2793 Overwrite: F 2794 If: () 2795 () 2797 >>Response 2799 HTTP/1.1 207 Multi-Status 2800 Content-Type: application/xml; charset="utf-8" 2801 Content-Length: xxxx 2803 2804 2805 2806 http://www.example.com/othercontainer/C2/ 2807 HTTP/1.1 423 Locked 2808 2809 2810 2812 In this example the client has submitted a number of lock tokens with 2813 the request. A lock token will need to be submitted for every 2814 resource, both source and destination, anywhere in the scope of the 2815 method, that is locked. In this case the proper lock token was not 2816 submitted for the destination 2817 http://www.example.com/othercontainer/C2/. This means that the 2818 resource /container/C2/ could not be moved. Because there was an 2819 error moving /container/C2/, none of /container/C2's members were 2820 moved. However no errors were listed for those members due to the 2821 error minimization rules. User agent authentication has previously 2822 occurred via a mechanism outside the scope of the HTTP protocol, in 2823 an underlying transport layer. 2825 9.10. LOCK Method 2827 The following sections describe the LOCK method, which is used to 2828 take out a lock of any access type and to refresh an existing lock. 2829 These sections on the LOCK method describe only those semantics that 2830 are specific to the LOCK method and are independent of the access 2831 type of the lock being requested. 2833 Any resource which supports the LOCK method MUST, at minimum, support 2834 the XML request and response formats defined herein. 2836 This method is neither idempotent nor safe (see Section 9.1 of 2837 [RFC2616]). Responses to this method MUST NOT be cached. 2839 9.10.1. Creating a Lock on an Existing Resource 2841 A LOCK request to an existing resource will create a lock on the 2842 resource identified by the Request-URI, provided the resource is not 2843 already locked with a conflicting lock. The resource identified in 2844 the Request-URI becomes the root of the lock. Lock method requests 2845 to create a new lock MUST have an XML request body. The server MUST 2846 preserve the information provided by the client in the 'owner' field 2847 in the request body when the lock information is requested. The LOCK 2848 request MAY have a Timeout header. 2850 When a new lock is created, the LOCK response: 2852 o MUST contain a body with the value of the DAV:lockdiscovery 2853 property in a prop XML element. This MUST contain the full 2854 information about the lock just granted, while information about 2855 other (shared) locks is OPTIONAL. 2857 o MUST include the Lock-Token response header with the token 2858 associated with the new lock. 2860 9.10.2. Refreshing Locks 2862 A lock is refreshed by sending a LOCK request to the URL of a 2863 resource within the scope of the lock. This request MUST NOT have a 2864 body and it MUST specify which lock to refresh by using the 'If' 2865 header with a single lock token (only one lock may be refreshed at a 2866 time). The request MAY contain a Timeout header, which a server MAY 2867 accept to change the duration remaining on the lock to the new value. 2868 A server MUST ignore the Depth header on a LOCK refresh. 2870 If the resource has other (shared) locks, those locks are unaffected 2871 by a lock refresh. Additionally, those locks do not prevent the 2872 named lock from being refreshed. 2874 The Lock-Token header is not returned in the response for a 2875 successful refresh LOCK request, but the LOCK response body MUST 2876 contain the new value for the DAV:lockdiscovery property. 2878 9.10.3. Depth and Locking 2880 The Depth header may be used with the LOCK method. Values other than 2881 0 or infinity MUST NOT be used with the Depth header on a LOCK 2882 method. All resources that support the LOCK method MUST support the 2883 Depth header. 2885 A Depth header of value 0 means to just lock the resource specified 2886 by the Request-URI. 2888 If the Depth header is set to infinity then the resource specified in 2889 the Request-URI along with all its members, all the way down the 2890 hierarchy, are to be locked. A successful result MUST return a 2891 single lock token. Similarly, if an UNLOCK is successfully executed 2892 on this token, all associated resources are unlocked. Hence, partial 2893 success is not an option for LOCK or UNLOCK. Either the entire 2894 hierarchy is locked or no resources are locked. 2896 If the lock cannot be granted to all resources, the server MUST 2897 return a Multi-Status response with a 'response' element for at least 2898 one resource which prevented the lock from being granted, along with 2899 a suitable status code for that failure (e.g. 403 (Forbidden) or 423 2900 (Locked)). Additionally, if the resource causing the failure was not 2901 the resource requested, then the server SHOULD include a 'response' 2902 element for the Request-URI as well, with a 'status' element 2903 containing 424 Failed Dependency. 2905 If no Depth header is submitted on a LOCK request then the request 2906 MUST act as if a "Depth:infinity" had been submitted. 2908 9.10.4. Locking Unmapped URLs 2910 A successful LOCK method MUST result in the creation of an empty 2911 resource which is locked (and which is not a collection), when a 2912 resource did not previously exist at that URL. Later on, the lock 2913 may go away but the empty resource remains. Empty resources MUST 2914 then appear in PROPFIND responses including that URL in the response 2915 scope. A server MUST respond successfully to a GET request to an 2916 empty resource, either by using a 204 No Content response, or by 2917 using 200 OK with a Content-Length header indicating zero length 2919 9.10.5. Lock Compatibility Table 2921 The table below describes the behavior that occurs when a lock 2922 request is made on a resource. 2924 +--------------------------+----------------+-------------------+ 2925 | Current State | Shared Lock OK | Exclusive Lock OK | 2926 +--------------------------+----------------+-------------------+ 2927 | None | True | True | 2928 | | | | 2929 | Shared Lock | True | False | 2930 | | | | 2931 | Exclusive Lock | False | False* | 2932 +--------------------------+----------------+-------------------+ 2934 Legend: True = lock may be granted. False = lock MUST NOT be 2935 granted. *=It is illegal for a principal to request the same lock 2936 twice. 2938 The current lock state of a resource is given in the leftmost column, 2939 and lock requests are listed in the first row. The intersection of a 2940 row and column gives the result of a lock request. For example, if a 2941 shared lock is held on a resource, and an exclusive lock is 2942 requested, the table entry is "false", indicating the lock must not 2943 be granted. 2945 9.10.6. LOCK Responses 2947 In addition to the general status codes possible, the following 2948 status codes have specific applicability to LOCK: 2950 200 (OK) - The LOCK request succeeded and the value of the DAV: 2951 lockdiscovery property is included in the response body. 2953 201 (Created) - The LOCK request was to an unmapped URL, the request 2954 succeeded and resulted in the creation of a new resource, and the 2955 value of the DAV:lockdiscovery property is included in the response 2956 body. 2958 409 (Conflict) - A resource cannot be created at the destination 2959 until one or more intermediate collections have been created. The 2960 server MUST NOT create those intermediate collections automatically. 2962 423 (Locked), potentially with 'no-conflicting-lock' precondition 2963 code - There is already a lock on the resource which is not 2964 compatible with the requested lock (see lock compatibility table 2965 above). 2967 412 (Precondition Failed), with 'lock-token-matches-request-uri' 2968 precondition code - The LOCK request was made with a If header, 2969 indicating that the client wishes to refresh the given lock. 2970 However, the Request-URI did not fall within the scope of the lock 2971 identified by the token. The lock may have a scope that does not 2972 include the Request-URI, or the lock could have disappeared, or the 2973 token may be invalid. 2975 9.10.7. Example - Simple Lock Request 2977 >>Request 2979 LOCK /workspace/webdav/proposal.doc HTTP/1.1 2980 Host: example.com 2981 Timeout: Infinite, Second-4100000000 2982 Content-Type: application/xml; charset="utf-8" 2983 Content-Length: xxxx 2984 Authorization: Digest username="ejw", 2985 realm="ejw@example.com", nonce="...", 2986 uri="/workspace/webdav/proposal.doc", 2987 response="...", opaque="..." 2989 2990 2991 2992 2993 2994 http://example.org/~ejw/contact.html 2995 2996 2998 >>Response 3000 HTTP/1.1 200 OK 3001 Lock-Token: 3002 Content-Type: application/xml; charset="utf-8" 3003 Content-Length: xxxx 3005 3006 3007 3008 3009 3010 3011 infinity 3012 3013 http://example.org/~ejw/contact.html 3014 3015 Second-604800 3016 3017 urn:uuid:e71d4fae-5dec-22d6-fea5-00a0c91e6be4 3019 3020 3021 http://example.com/workspace/webdav/proposal.doc 3023 3024 3025 3026 3028 This example shows the successful creation of an exclusive write lock 3029 on resource http://example.com/workspace/webdav/proposal.doc. The 3030 resource http://example.org/~ejw/contact.html contains contact 3031 information for the creator of the lock. The server has an activity- 3032 based timeout policy in place on this resource, which causes the lock 3033 to automatically be removed after 1 week (604800 seconds). Note that 3034 the nonce, response, and opaque fields have not been calculated in 3035 the Authorization request header. 3037 9.10.8. Example - Refreshing a Write Lock 3039 >>Request 3041 LOCK /workspace/webdav/proposal.doc HTTP/1.1 3042 Host: example.com 3043 Timeout: Infinite, Second-4100000000 3044 If: () 3045 Authorization: Digest username="ejw", 3046 realm="ejw@example.com", nonce="...", 3047 uri="/workspace/webdav/proposal.doc", 3048 response="...", opaque="..." 3050 >>Response 3052 HTTP/1.1 200 OK 3053 Content-Type: application/xml; charset="utf-8" 3054 Content-Length: xxxx 3056 3057 3058 3059 3060 3061 3062 infinity 3063 3064 http://example.org/~ejw/contact.html 3065 3066 Second-604800 3067 3068 urn:uuid:e71d4fae-5dec-22d6-fea5-00a0c91e6be4 3070 3071 3072 http://example.com/workspace/webdav/proposal.doc 3074 3075 3076 3077 3079 This request would refresh the lock, attempting to reset the timeout 3080 to the new value specified in the timeout header. Notice that the 3081 client asked for an infinite time out but the server choose to ignore 3082 the request. In this example, the nonce, response, and opaque fields 3083 have not been calculated in the Authorization request header. 3085 9.10.9. Example - Multi-Resource Lock Request 3087 >>Request 3089 LOCK /webdav/ HTTP/1.1 3090 Host: example.com 3091 Timeout: Infinite, Second-4100000000 3092 Depth: infinity 3093 Content-Type: application/xml; charset="utf-8" 3094 Content-Length: xxxx 3095 Authorization: Digest username="ejw", 3096 realm="ejw@example.com", nonce="...", 3097 uri="/workspace/webdav/proposal.doc", 3098 response="...", opaque="..." 3100 3101 3102 3103 3104 3105 http://example.org/~ejw/contact.html 3106 3107 3109 >>Response 3111 HTTP/1.1 207 Multi-Status 3112 Content-Type: application/xml; charset="utf-8" 3113 Content-Length: xxxx 3115 3116 3117 3118 http://example.com/webdav/secret 3119 HTTP/1.1 403 Forbidden 3120 3121 3122 http://example.com/webdav/ 3123 HTTP/1.1 424 Failed Dependency 3124 3125 3127 This example shows a request for an exclusive write lock on a 3128 collection and all its children. In this request, the client has 3129 specified that it desires an infinite length lock, if available, 3130 otherwise a timeout of 4.1 billion seconds, if available. The 3131 request entity body contains the contact information for the 3132 principal taking out the lock, in this case a web page URL. 3134 The error is a 403 (Forbidden) response on the resource 3135 http://example.com/webdav/secret. Because this resource could not be 3136 locked, none of the resources were locked. Note also that the a 3137 'response' element for the Request-URI itself has been included as 3138 required. 3140 In this example, the nonce, response, and opaque fields have not been 3141 calculated in the Authorization request header. 3143 9.11. UNLOCK Method 3145 The UNLOCK method removes the lock identified by the lock token in 3146 the Lock-Token request header. The Request-URI MUST identify a 3147 resource within the scope of the lock. 3149 Note that use of Lock-Token header to provide the lock token is not 3150 consistent with other state-changing methods which all require an If 3151 header with the lock token. Thus, the If header is not needed to 3152 provide the lock token. Naturally when the If header is present it 3153 has its normal meaning as a conditional header. 3155 For a successful response to this method, the server MUST delete the 3156 lock entirely. 3158 If all resources which have been locked under the submitted lock 3159 token can not be unlocked then the UNLOCK request MUST fail. 3161 A successful response to an UNLOCK method does not mean that the 3162 resource is necessarily unlocked. It means that the specific lock 3163 corresponding to the specified token no longer exists. 3165 Any DAV compliant resource which supports the LOCK method MUST 3166 support the UNLOCK method. 3168 This method is idempotent, but not safe (see Section 9.1 of 3169 [RFC2616]). Responses to this method MUST NOT be cached. 3171 9.11.1. Status Codes 3173 In addition to the general status codes possible, the following 3174 status codes have specific applicability to UNLOCK: 3176 204 (No Content) - Normal success response (rather than 200 OK, since 3177 200 OK would imply a response body, and an UNLOCK success response 3178 does not normally contain a body) 3179 400 (Bad Request) - No lock token was provided. 3181 403 (Forbidden) - The currently authenticated principal does not have 3182 permission to remove the lock. 3184 409 (Conflict), with 'lock-token-matches-request-uri' precondition - 3185 The resource was not locked, or the request was made to a Request-URI 3186 that was not within the scope of the lock. 3188 9.11.2. Example - UNLOCK 3190 >>Request 3192 UNLOCK /workspace/webdav/info.doc HTTP/1.1 3193 Host: example.com 3194 Lock-Token: 3195 Authorization: Digest username="ejw" 3196 realm="ejw@example.com", nonce="...", 3197 uri="/workspace/webdav/proposal.doc", 3198 response="...", opaque="..." 3200 >>Response 3202 HTTP/1.1 204 No Content 3204 In this example, the lock identified by the lock token 3205 "urn:uuid:a515cfa4-5da4-22e1-f5b5-00a0451e6bf7" is successfully 3206 removed from the resource 3207 http://example.com/workspace/webdav/info.doc. If this lock included 3208 more than just one resource, the lock is removed from all resources 3209 included in the lock. 3211 In this example, the nonce, response, and opaque fields have not been 3212 calculated in the Authorization request header. 3214 10. HTTP Headers for Distributed Authoring 3216 All DAV headers follow the same basic formatting rules as HTTP 3217 headers. This includes rules like line continuation and how to 3218 combine (or separate) multiple instances of the same header using 3219 commas. 3221 WebDAV adds two new conditional headers to the set defined in HTTP: 3222 the If and Overwrite headers. 3224 10.1. DAV Header 3226 DAV = "DAV" ":" #( compliance-class ) 3227 compliance-class = ( "1" | "2" | "3" | extend ) 3228 extend = Coded-URL | token 3229 Coded-URL = "<" absolute-URI ">" 3230 ; No linear white space (LWS) allowed in Coded-URL 3231 ; absolute-URI is defined in RFC3986 3233 This general-header appearing in the response indicates that the 3234 resource supports the DAV schema and protocol as specified. All DAV 3235 compliant resources MUST return the DAV header with compliance-class 3236 "1" on all OPTIONS responses. In cases where WebDAV is only 3237 supported in part of the server namespace, an OPTIONS request to non- 3238 WebDAV resources (including "/") SHOULD NOT advertise WebDAV support. 3240 The value is a comma-separated list of all compliance class 3241 identifiers that the resource supports. Class identifiers may be 3242 Coded-URLs or tokens (as defined by [RFC2616]). Identifiers can 3243 appear in any order. Identifiers that are standardized through the 3244 IETF RFC process are tokens, but other identifiers SHOULD be Coded- 3245 URLs to encourage uniqueness. 3247 A resource must show class 1 compliance if it shows class 2 or 3 3248 compliance. In general, support for one compliance class does not 3249 entail support for any other, and in particular, support for 3250 compliance class 3 does not require support for compliance class 2. 3251 Please refer to Section 18 for more details on compliance classes 3252 defined in this specification. 3254 Note that many WebDAV servers do not advertise WebDAV support in 3255 response to "OPTIONS *". 3257 As a request header, this header allows the client to advertise 3258 compliance with named features when the server needs that 3259 information. Clients SHOULD NOT send this header unless a standards 3260 track specification requires it. Any extension that makes use of 3261 this as a request header will need to carefully consider caching 3262 implications. 3264 10.2. Depth Header 3266 Depth = "Depth" ":" ("0" | "1" | "infinity") 3268 The Depth request header is used with methods executed on resources 3269 which could potentially have internal members to indicate whether the 3270 method is to be applied only to the resource ("Depth: 0"), to the 3271 resource and its internal members only, ("Depth: 1"), or the resource 3272 and all its members ("Depth: infinity"). 3274 The Depth header is only supported if a method's definition 3275 explicitly provides for such support. 3277 The following rules are the default behavior for any method that 3278 supports the Depth header. A method may override these defaults by 3279 defining different behavior in its definition. 3281 Methods which support the Depth header may choose not to support all 3282 of the header's values and may define, on a case by case basis, the 3283 behavior of the method if a Depth header is not present. For 3284 example, the MOVE method only supports "Depth: infinity" and if a 3285 Depth header is not present will act as if a "Depth: infinity" header 3286 had been applied. 3288 Clients MUST NOT rely upon methods executing on members of their 3289 hierarchies in any particular order or on the execution being atomic 3290 unless the particular method explicitly provides such guarantees. 3292 Upon execution, a method with a Depth header will perform as much of 3293 its assigned task as possible and then return a response specifying 3294 what it was able to accomplish and what it failed to do. 3296 So, for example, an attempt to COPY a hierarchy may result in some of 3297 the members being copied and some not. 3299 By default, the Depth header does not interact with other headers. 3300 That is, each header on a request with a Depth header MUST be applied 3301 only to the Request-URI if it applies to any resource, unless 3302 specific Depth behavior is defined for that header. 3304 If a resource, source or destination, within the scope of the method 3305 with a Depth header is locked in such a way as to prevent the 3306 successful execution of the method, then the lock token for that 3307 resource MUST be submitted with the request in the If request header. 3309 The Depth header only specifies the behavior of the method with 3310 regards to internal members. If a resource does not have internal 3311 members then the Depth header MUST be ignored. 3313 10.3. Destination Header 3315 The Destination request header specifies the URI which identifies a 3316 destination resource for methods such as COPY and MOVE, which take 3317 two URIs as parameters. 3319 Destination = "Destination" ":" Simple-ref 3321 If the Destination value is an absolute-URI (Section 4.3 of 3322 [RFC3986]), it may name a different server (or different port or 3323 scheme). If the source server cannot attempt a copy to the remote 3324 server, it MUST fail the request. Note that copying and moving 3325 resources to remote servers is not fully defined in this 3326 specification (e.g. specific error conditions). 3328 If the Destination value is too long or otherwise unacceptable, the 3329 server SHOULD return 400 (Bad Request), ideally with helpful 3330 information in an error body. 3332 10.4. If Header 3334 The If request header is intended to have similar functionality to 3335 the If-Match header defined in Section 14.24 of [RFC2616]. However 3336 the If header handles any state token as well as ETags. A typical 3337 example of a state token is a lock token, and lock tokens are the 3338 only state tokens defined in this specification. 3340 10.4.1. Purpose 3342 The If header has two distinct purposes: 3344 o The first purpose is to make a request conditional by supplying a 3345 series of state lists with conditions that match tokens and ETags 3346 to specific resource. If this header is evaluated and all state 3347 lists fail, then the request MUST fail with a 412 (Precondition 3348 Failed) status. On the other hand, the request can succeed only 3349 if one of the described state lists succeeds. The success 3350 criteria for state lists and matching functions are defined in 3351 Section 10.4.3 and Section 10.4.4. 3353 o Additionally, the mere fact that a state token appears in an If 3354 header means that it has been "submitted" with the request. In 3355 general, this is used to indicate that the client has knowledge of 3356 that state token. The semantics for submitting a state token 3357 depend on its type (for lock tokens, please refer to Section 6). 3359 Note that these two purposes need to be treated distinctly: a state 3360 token counts as being submitted independently of whether the server 3361 actually has evaluated the state list it appears in, and also 3362 independently of whether the condition it expressed was found to be 3363 true or not. 3365 10.4.2. Syntax 3367 If = "If" ":" ( 1*No-tag-list | 1*Tagged-list ) 3369 No-tag-list = List 3370 Tagged-list = Resource-Tag 1*List 3372 List = "(" 1*Condition ")" 3373 Condition = ["Not"] (State-token | "[" entity-tag "]") 3374 ; entity-tag: see Section 3.11 of [RFC2616] 3375 ; No LWS allowed between "[", entity-tag and "]" 3377 State-token = Coded-URL 3379 Resource-Tag = "<" Simple-ref ">" 3380 ; Simple-ref: see Section 8.3 3381 ; No LWS allowed in Resource-Tag 3383 The syntax distinguishes between untagged lists ("No-tag-list") and 3384 tagged lists ("Tagged-list"). Untagged lists apply to the resource 3385 identified by the Request-URI, while tagged lists apply to the 3386 resource identified by the preceding Resource-Tag. 3388 A Resource-Tag applies to all subsequent Lists, up to the next 3389 Resource-Tag. 3391 Note that the two list types cannot be mixed within an If header. 3392 This is not a functional restriction because the No-tag-list syntax 3393 is just a shorthand notation for a Tagged-list production with a 3394 Resource-Tag referring to the Request-URI. 3396 Each List consists of one or more Conditions. Each Condition is 3397 defined in terms of an entity-tag or state-token, potentially negated 3398 by the prefix "Not". 3400 Note that the If header syntax does not allow multiple instances of 3401 If headers in a single request. However, the HTTP header syntax 3402 allows extending single header values across multiple lines, by 3403 inserting a line break followed by whitespace (see [RFC2616], Section 3404 4.2). 3406 10.4.3. List Evaluation 3408 A Condition that consists of a single entity-tag or state-token 3409 evaluates to true if the resource matches the described state (where 3410 the individual matching functions are defined below in 3411 Section 10.4.4). Prefixing it with "Not" reverses the result of the 3412 evaluation (thus, the "Not" applies only to the subsequent entity-tag 3413 or state-token). 3415 Each List production describes a series of conditions. The whole 3416 list evaluates to true if and only if each condition evaluates to 3417 true (that is, the list represents a logical conjunction of 3418 Conditions). 3420 Each No-tag-list and Tagged-list production may contain one or more 3421 Lists. They evaluate to true if and only if any of the contained 3422 lists evaluates to true (that is, if there's more than one List, that 3423 List sequence represents a logical disjunction of the Lists). 3425 Finally, the whole If header evaluates to true if and only if at 3426 least one of the No-tag-list or Tagged-list productions evaluates to 3427 true. If the header evaluates to false, the server MUST reject the 3428 request with a 412 (Precondition Failed) status. Otherwise, 3429 execution of the request can proceed as if the header wasn't present. 3431 10.4.4. Matching State Tokens and ETags 3433 When performing If header processing, the definition of a matching 3434 state token or entity tag is as follows: 3436 Identifying a resource: The resource is identified by the URI along 3437 with the token, in tagged list production, or by the Request-URI in 3438 untagged list production. 3440 Matching entity tag: Where the entity tag matches an entity tag 3441 associated with the identified resource. Servers MUST use either the 3442 weak or the strong comparison function defined in Section 13.3.3 of 3443 [RFC2616]. 3445 Matching state token: Where there is an exact match between the state 3446 token in the If header and any state token on the identified 3447 resource. A lock state token is considered to match if the resource 3448 is anywhere in the scope of the lock. 3450 Handling unmapped URLs: for both ETags and state tokens, treat as if 3451 the URL identified a resource that exists but does not have the 3452 specified state. 3454 10.4.5. If Header and Non-DAV Aware Proxies 3456 Non-DAV aware proxies will not honor the If header, since they will 3457 not understand the If header, and HTTP requires non-understood 3458 headers to be ignored. When communicating with HTTP/1.1 proxies, the 3459 client MUST use the "Cache-Control: no-cache" request header so as to 3460 prevent the proxy from improperly trying to service the request from 3461 its cache. When dealing with HTTP/1.0 proxies the "Pragma: no-cache" 3462 request header MUST be used for the same reason. 3464 As in general clients may not be able to reliably detect non-DAV 3465 aware intermediates, they are advised to always prevent caching using 3466 the request directives mentioned above. 3468 10.4.6. Example - No-tag Production 3470 If: ( 3471 ["I am an ETag"]) 3472 (["I am another ETag"]) 3474 The previous header would require that the resource identified in the 3475 Request-URI be locked with the specified lock token and be in the 3476 state identified by the "I am an ETag" ETag or in the state 3477 identified by the second ETag "I am another ETag". 3479 To put the matter more plainly one can think of the previous If 3480 header as expressing the condition below: 3482 ( 3483 is-locked-with(urn:uuid:181d4fae-7d8c-11d0-a765-00a0c91e6bf2) AND 3484 matches-etag("I am an ETag") 3485 ) 3486 OR 3487 ( 3488 matches-etag("I am another ETag") 3489 ) 3491 10.4.7. Example - using "Not" with No-tag Production 3493 If: (Not 3494 ) 3496 This If header requires that the resource must not be locked with a 3497 lock having the lock token 3498 urn:uuid:181d4fae-7d8c-11d0-a765-00a0c91e6bf2 and must be locked by a 3499 lock with the lock token 3500 urn:uuid:58f202ac-22cf-11d1-b12d-002035b29092. 3502 10.4.8. Example - causing a Condition to always evaluate to True 3504 There may be cases where a client wishes to submit state tokens, but 3505 doesn't want the request to fail just because the state token isn't 3506 current anymore. One simple way to do this is to include a Condition 3507 that is known to always evaluate to true, such as in: 3509 If: () 3510 (Not ) 3512 "DAV:no-lock" is known to never represent a current lock token, as 3513 lock tokens are assigned by the server, following the uniqueness 3514 requirements described in Section 6.5, therefore in particular 3515 exclude URIs in the "DAV:" scheme. Thus, by applying "Not" to a 3516 known not to be current state token, the Condition always evaluates 3517 to true. Consequently, the whole If header will always evaluate to 3518 true, and the lock token 3519 urn:uuid:181d4fae-7d8c-11d0-a765-00a0c91e6bf2 will be submitted in 3520 any case. 3522 10.4.9. Example - Tagged List If header in COPY 3524 >>Request 3526 COPY /resource1 HTTP/1.1 3527 Host: www.example.com 3528 Destination: /resource2 3529 If: 3530 ( 3531 [W/"A weak ETag"]) (["strong ETag"]) 3533 In this example http://www.example.com/resource1 is being copied to 3534 http://www.example.com/resource2. When the method is first applied 3535 to http://www.example.com/resource1, resource1 must be in the state 3536 specified by "( [W/"A 3537 weak ETag"]) (["strong ETag"])", that is, it either must be locked 3538 with a lock token of "urn:uuid:181d4fae-7d8c-11d0-a765-00a0c91e6bf2" 3539 and have a weak entity tag W/"A weak ETag" or it must have a strong 3540 entity tag "strong ETag". 3542 10.4.10. Example - Matching lock tokens with collection locks 3544 DELETE /specs/rfc2518.txt HTTP/1.1 3545 Host: www.example.com 3546 If: 3547 () 3549 For this example, the lock token must be compared to the identified 3550 resource, which is the 'specs' collection identified by the URL in 3551 the tagged list production. If the 'specs' collection is not locked 3552 by a lock with the specified lock token, the request MUST fail. 3553 Otherwise, this request could succeed, because the If header 3554 evaluates to true, and because the lock token for the lock affecting 3555 the affected resource has been submitted. 3557 10.4.11. Example - Matching ETags on unmapped URLs 3559 Consider a collection "/specs" that does not contain the member 3560 "/specs/rfc2518.doc". In this case, the If header 3562 If: (["4217"]) 3564 will evaluate to false (the URI isn't mapped, thus the resource 3565 identified by the URI doesn't have an entity matching the ETag 3566 "4217"). 3568 On the other hand, an If header of 3570 If: (Not ["4217"]) 3572 will consequently evaluate to true. 3574 Note that as defined above in Section 10.4.4, the same considerations 3575 apply to matching state tokens. 3577 10.5. Lock-Token Header 3579 Lock-Token = "Lock-Token" ":" Coded-URL 3581 The Lock-Token request header is used with the UNLOCK method to 3582 identify the lock to be removed. The lock token in the Lock-Token 3583 request header MUST identify a lock that contains the resource 3584 identified by Request-URI as a member. 3586 The Lock-Token response header is used with the LOCK method to 3587 indicate the lock token created as a result of a successful LOCK 3588 request to create a new lock. 3590 10.6. Overwrite Header 3592 Overwrite = "Overwrite" ":" ("T" | "F") 3594 The Overwrite request header specifies whether the server should 3595 overwrite a resource mapped to the destination URL during a COPY or 3596 MOVE. A value of "F" states that the server must not perform the 3597 COPY or MOVE operation if the destination URL does map to a resource. 3599 If the overwrite header is not included in a COPY or MOVE request 3600 then the resource MUST treat the request as if it has an overwrite 3601 header of value "T". While the Overwrite header appears to duplicate 3602 the functionality of using a "If-Match: *" header (see [RFC2616]), 3603 If-Match applies only to the Request-URI, and not to the Destination 3604 of a COPY or MOVE. 3606 If a COPY or MOVE is not performed due to the value of the Overwrite 3607 header, the method MUST fail with a 412 (Precondition Failed) status 3608 code. The server MUST do authorization checks before checking this 3609 or any conditional header. 3611 All DAV compliant resources MUST support the Overwrite header. 3613 10.7. Timeout Request Header 3615 TimeOut = "Timeout" ":" 1#TimeType 3616 TimeType = ("Second-" DAVTimeOutVal | "Infinite") 3617 ; No LWS allowed within TimeType 3618 DAVTimeOutVal = 1*DIGIT 3620 Clients MAY include Timeout request headers in their LOCK requests. 3621 However, the server is not required to honor or even consider these 3622 requests. Clients MUST NOT submit a Timeout request header with any 3623 method other than a LOCK method. 3625 The "Second" TimeType specifies the number of seconds that will 3626 elapse between granting of the lock at the server, and the automatic 3627 removal of the lock. The timeout value for TimeType "Second" MUST 3628 NOT be greater than 2^32-1. 3630 See Section 6.6 for a description of lock timeout behavior. 3632 11. Status Code Extensions to HTTP/1.1 3634 The following status codes are added to those defined in HTTP/1.1 3635 [RFC2616]. 3637 11.1. 207 Multi-Status 3639 The 207 (Multi-Status) status code provides status for multiple 3640 independent operations (see Section 13 for more information). 3642 11.2. 422 Unprocessable Entity 3644 The 422 (Unprocessable Entity) status code means the server 3645 understands the content type of the request entity (hence a 3646 415(Unsupported Media Type) status code is inappropriate), and the 3647 syntax of the request entity is correct (thus a 400 (Bad Request) 3648 status code is inappropriate) but was unable to process the contained 3649 instructions. For example, this error condition may occur if an XML 3650 request body contains well-formed (i.e., syntactically correct), but 3651 semantically erroneous XML instructions. 3653 11.3. 423 Locked 3655 The 423 (Locked) status code means the source or destination resource 3656 of a method is locked. This response SHOULD contain an appropriate 3657 precondition or postcondition code, such as 'lock-token-submitted' or 3658 'no-conflicting-lock". 3660 11.4. 424 Failed Dependency 3662 The 424 (Failed Dependency) status code means that the method could 3663 not be performed on the resource because the requested action 3664 depended on another action and that action failed. For example, if a 3665 command in a PROPPATCH method fails then, at minimum, the rest of the 3666 commands will also fail with 424 (Failed Dependency). 3668 11.5. 507 Insufficient Storage 3670 The 507 (Insufficient Storage) status code means the method could not 3671 be performed on the resource because the server is unable to store 3672 the representation needed to successfully complete the request. This 3673 condition is considered to be temporary. If the request which 3674 received this status code was the result of a user action, the 3675 request MUST NOT be repeated until it is requested by a separate user 3676 action. 3678 12. Use of HTTP Status Codes 3680 These HTTP codes are not redefined, but their use is somewhat 3681 extended by WebDAV methods and requirements. In general, many HTTP 3682 status codes can be used in response to any request, not just in 3683 cases described in this document. Note also that WebDAV servers are 3684 known to use 300-level redirect responses (and early interoperability 3685 tests found clients unprepared to see those responses). A 300-level 3686 response MUST NOT be used when the server has created a new resource 3687 in response to the request. 3689 12.1. 412 Precondition Failed 3691 Any request can contain a conditional header defined in HTTP (If- 3692 Match, If-Modified-Since, etc.) or the "If" or "Overwrite" 3693 conditional headers defined in this specification. If the server 3694 evaluates a conditional header, and if that condition fails to hold, 3695 then this error code MUST be returned. On the other hand, if the 3696 client did not include a conditional header in the request, then the 3697 server MUST NOT use this status code. 3699 12.2. 414 Request-URI Too Long 3701 This status code is used in HTTP 1.1 only for Request-URIs, not URIs 3702 in other locations. 3704 13. Multi-Status Response 3706 A Multi-Status response conveys information about multiple resources 3707 in situations where multiple status codes might be appropriate. The 3708 default Multi-Status response body is a text/xml or application/xml 3709 HTTP entity with a 'multistatus' root element. Further elements 3710 contain 200, 300, 400, and 500 series status codes generated during 3711 the method invocation. 100 series status codes SHOULD NOT be recorded 3712 in a 'response' XML element. 3714 Although '207' is used as the overall response status code, the 3715 recipient needs to consult the contents of the multistatus response 3716 body for further information about the success or failure of the 3717 method execution. The response MAY be used in success, partial 3718 success and also in failure situations. 3720 The 'multistatus' root element holds zero or more 'response' elements 3721 in any order, each with information about an individual resource. 3722 Each 'response' element MUST have an 'href' element to identify the 3723 resource. 3725 A Multi-Status response uses one out of two distinct formats for 3726 representing the status: 3728 1. A 'status' element as child of the 'response' element indicates 3729 the status of the message execution for the identified resource 3730 as a whole (for instance, see Section 9.6.2). Some method 3731 definitions provide information about specific status codes 3732 clients should be prepared to see in a response. However, 3733 clients MUST be able to handle other status codes, using the 3734 generic rules defined in Section 10 of [RFC2616]. 3736 2. For PROPFIND and PROPPATCH, the format has been extended using 3737 the 'propstat' element instead of 'status', providing information 3738 about individual properties of a resource. This format is 3739 specific to PROPFIND and PROPPATCH, and is described in detail in 3740 Section 9.1 and Section 9.2. 3742 13.1. Response Headers 3744 HTTP defines the Location header to indicate a preferred URL for the 3745 resource that was addressed in the Request-URI (e.g. in response to 3746 successful PUT requests or in redirect responses). However, use of 3747 this header creates ambiguity when there are URLs in the body of the 3748 response, as with Multi-Status. Thus, use of the Location header 3749 with the Multi-Status response is intentionally undefined. 3751 13.2. Handling Redirected Child Resources 3753 Redirect responses (300-303, 305 and 307) defined in HTTP 1.1 3754 normally take a Location header to indicate the new URI for the 3755 single resource redirected from the Request-URI. Multi-Status 3756 responses contain many resource addresses, but the original 3757 definition in [RFC2518] did not have any place for the server to 3758 provide the new URI for redirected resources. This specification 3759 does define a 'location' element for this information (see 3760 Section 14.9). Servers MUST use this new element with redirect 3761 responses in Multi-Status. 3763 Clients encountering redirected resources in Multi-Status MUST NOT 3764 rely on the 'location' element being present with a new URI. If the 3765 element is not present, the client MAY reissue the request to the 3766 individual redirected resource, because the response to that request 3767 can be redirected with a Location header containing the new URI. 3769 13.3. Internal Status Codes 3771 Section 9.2.1, Section 9.1.2, Section 9.6.1, Section 9.8.3 and 3772 Section 9.9.2 define various status codes used in Multi-Status 3773 responses. This specification does not define the meaning of other 3774 status codes that could appear in these responses. 3776 14. XML Element Definitions 3778 In this section, the final line of each section gives the element 3779 type declaration using the format defined in [REC-XML]. The "Value" 3780 field, where present, specifies further restrictions on the allowable 3781 contents of the XML element using BNF (i.e., to further restrict the 3782 values of a PCDATA element). Note that all of the elements defined 3783 here may be extended according to the rules defined in Section 17. 3784 All elements defined here are in the "DAV:" namespace. 3786 14.1. activelock XML Element 3788 Name: activelock 3790 Purpose: Describes a lock on a resource. 3792 3795 14.2. allprop XML Element 3797 Name: allprop 3799 Purpose: Specifies that all names and values of dead properties and 3800 the live properties defined by this document existing on the 3801 resource are to be returned. 3803 3805 14.3. collection XML Element 3807 Name: collection 3809 Purpose: Identifies the associated resource as a collection. The 3810 DAV:resourcetype property of a collection resource MUST contain 3811 this element. It is normally empty but extensions may add sub- 3812 elements. 3814 3816 14.4. depth XML Element 3818 Name: depth 3819 Purpose: Used for representing depth values in XML content (e.g. in 3820 lock information). 3822 Value: "0" | "1" | "infinity" 3824 3826 14.5. error XML Element 3828 Name: error 3830 Purpose: Error responses, particularly 403 Forbidden and 409 3831 Conflict, sometimes need more information to indicate what went 3832 wrong. In these cases, servers MAY return an XML response body 3833 with a document element of 'error', containing child elements 3834 identifying particular condition codes. 3836 Description: Contains at least one XML element, and MUST NOT 3837 contain text or mixed content. Any element that is a child of the 3838 'error' element is considered to be a precondition or 3839 postcondition code. Unrecognized elements MUST be ignored. 3841 3843 14.6. exclusive XML Element 3845 Name: exclusive 3847 Purpose: Specifies an exclusive lock. 3849 3851 14.7. href XML Element 3853 Name: href 3855 Purpose: MUST contain a URI or a relative reference. 3857 Description: There may be limits on the value of 'href' depending 3858 on the context of its use. Refer to the specification text where 3859 'href' is used to see what limitations apply in each case. 3861 Value: Simple-ref 3863 3865 14.8. include XML Element 3867 Name: include 3869 Purpose: Any child element represents the name of a property to be 3870 included in the PROPFIND response. All elements inside an 3871 'include' XML element MUST define properties related to the 3872 resource, although possible property names are in no way limited 3873 to those property names defined in this document or other 3874 standards. This element MUST NOT contain text or mixed content. 3876 3878 14.9. location XML Element 3880 Name: location 3882 Purpose: HTTP defines the "Location" header (see [RFC2616], Section 3883 14.30) for use with some status codes (such as 201 and the 300 3884 series codes). When these codes are used inside a 'multistatus' 3885 element, the 'location' element can be used to provide the 3886 accompanying Location header value. 3888 Description: Contains a single href element with the same value 3889 that would be used in a Location header. 3891 3893 14.10. lockentry XML Element 3895 Name: lockentry 3897 Purpose: Defines the types of locks that can be used with the 3898 resource. 3900 3902 14.11. lockinfo XML Element 3904 Name: lockinfo 3906 Purpose: The 'lockinfo' XML element is used with a LOCK method to 3907 specify the type of lock the client wishes to have created. 3909 3911 14.12. lockroot XML Element 3913 Name: lockroot 3915 Purpose: Contains the root URL of the lock, which is the URL 3916 through which the resource was addressed in the LOCK request. 3918 Description: The href element contains the root of the lock. The 3919 server SHOULD include this in all DAV:lockdiscovery property 3920 values and the response to LOCK requests. 3922 3924 14.13. lockscope XML Element 3926 Name: lockscope 3928 Purpose: Specifies whether a lock is an exclusive lock, or a shared 3929 lock. 3931 3933 14.14. locktoken XML Element 3935 Name: locktoken 3937 Purpose: The lock token associated with a lock. 3939 Description: The href contains a single lock token URI which refers 3940 to the lock. 3942 3944 14.15. locktype XML Element 3946 Name: locktype 3948 Purpose: Specifies the access type of a lock. At present, this 3949 specification only defines one lock type, the write lock. 3951 3953 14.16. multistatus XML Element 3955 Name: multistatus 3957 Purpose: Contains multiple response messages. 3959 Description: The 'responsedescription' element at the top level is 3960 used to provide a general message describing the overarching 3961 nature of the response. If this value is available an application 3962 may use it instead of presenting the individual response 3963 descriptions contained within the responses. 3965 3967 14.17. owner XML Element 3969 Name: owner 3971 Purpose: Provides information about the creator of a lock. 3973 Description: Allows a client to provide information sufficient for 3974 either directly contacting a principal (such as a telephone number 3975 or Email URI), or for discovering the principal (such as the URL 3976 of a homepage) who created a lock. The value provided MUST be 3977 treated as a dead property in terms of XML Information Item 3978 preservation. The server MUST NOT alter the value unless the 3979 owner value provided by the client is empty. For a certain amount 3980 of interoperability between different client implementations, if 3981 clients have URI-formatted contact information for the lock 3982 creator suitable for user display, then clients SHOULD put those 3983 URIs in 'href' child elements of the 'owner' element. 3985 Extensibility: MAY be extended with child elements, mixed content, 3986 text content or attributes. 3988 3990 14.18. prop XML Element 3992 Name: prop 3994 Purpose: Contains properties related to a resource. 3996 Description: A generic container for properties defined on 3997 resources. All elements inside a 'prop' XML element MUST define 3998 properties related to the resource, although possible property 3999 names are in no way limited to those property names defined in 4000 this document or other standards. This element MUST NOT contain 4001 text or mixed content. 4003 4005 14.19. propertyupdate XML Element 4007 Name: propertyupdate 4009 Purpose: Contains a request to alter the properties on a resource. 4011 Description: This XML element is a container for the information 4012 required to modify the properties on the resource. 4014 4016 14.20. propfind XML Element 4018 Name: propfind 4020 Purpose: Specifies the properties to be returned from a PROPFIND 4021 method. Four special elements are specified for use with 4022 'propfind': 'prop', 'allprop', 'include' and 'propname'. If 4023 'prop' is used inside 'propfind' it MUST NOT contain property 4024 values. 4026 4028 14.21. propname XML Element 4030 Name: propname 4032 Purpose: Specifies that only a list of property names on the 4033 resource is to be returned. 4035 4037 14.22. propstat XML Element 4039 Name: propstat 4040 Purpose: Groups together a prop and status element that is 4041 associated with a particular 'href' element. 4043 Description: The propstat XML element MUST contain one prop XML 4044 element and one status XML element. The contents of the prop XML 4045 element MUST only list the names of properties to which the result 4046 in the status element applies. The optional precondition/ 4047 postcondition element and 'responsedescription' text also apply to 4048 the properties named in 'prop'. 4050 4052 14.23. remove XML Element 4054 Name: remove 4056 Purpose: Lists the properties to be removed from a resource. 4058 Description: Remove instructs that the properties specified in prop 4059 should be removed. Specifying the removal of a property that does 4060 not exist is not an error. All the XML elements in a 'prop' XML 4061 element inside of a 'remove' XML element MUST be empty, as only 4062 the names of properties to be removed are required. 4064 4066 14.24. response XML Element 4068 Name: response 4070 Purpose: Holds a single response describing the effect of a method 4071 on resource and/or its properties. 4073 Description: The 'href' element contains a HTTP URL pointing to a 4074 WebDAV resource when used in the 'response' container. A 4075 particular 'href' value MUST NOT appear more than once as the 4076 child of a 'response' XML element under a 'multistatus' XML 4077 element. This requirement is necessary in order to keep 4078 processing costs for a response to linear time. Essentially, this 4079 prevents having to search in order to group together all the 4080 responses by 'href'. There are, however, no requirements 4081 regarding ordering based on 'href' values. The optional 4082 precondition/postcondition element and 'responsedescription' text 4083 can provide additional information about this resource relative to 4084 the request or result. 4086 4089 14.25. responsedescription XML Element 4091 Name: responsedescription 4093 Purpose: Contains information about a status response within a 4094 Multi-Status. 4096 Description: Provides information suitable to be presented to a 4097 user. 4099 4101 14.26. set XML Element 4103 Name: set 4105 Purpose: Lists the property values to be set for a resource. 4107 Description: The 'set' element MUST contain only a 'prop' element. 4108 The elements contained by the 'prop' element inside the 'set' 4109 element MUST specify the name and value of properties that are set 4110 on the resource identified by Request-URI. If a property already 4111 exists then its value is replaced. Language tagging information 4112 appearing in the scope of the 'prop' element (in the "xml:lang" 4113 attribute, if present) MUST be persistently stored along with the 4114 property, and MUST be subsequently retrievable using PROPFIND. 4116 4118 14.27. shared XML Element 4120 Name: shared 4122 Purpose: Specifies a shared lock. 4124 4126 14.28. status XML Element 4128 Name: status 4129 Purpose: Holds a single HTTP status-line. 4131 Value: status-line (defined in Section 6.1 of [RFC2616]) 4133 4135 14.29. timeout XML Element 4137 Name: timeout 4139 Purpose: The number of seconds remaining before a lock expires. 4141 Value: TimeType (defined in Section 10.7). 4143 4145 14.30. write XML Element 4147 Name: write 4149 Purpose: Specifies a write lock. 4151 4153 15. DAV Properties 4155 For DAV properties, the name of the property is also the same as the 4156 name of the XML element that contains its value. In the section 4157 below, the final line of each section gives the element type 4158 declaration using the format defined in [REC-XML]. The "Value" 4159 field, where present, specifies further restrictions on the allowable 4160 contents of the XML element using BNF (i.e., to further restrict the 4161 values of a PCDATA element). 4163 A protected property is one which cannot be changed with a PROPPATCH 4164 request. There may be other requests which would result in a change 4165 to a protected property (as when a LOCK request affects the value of 4166 DAV:lockdiscovery). Note that a given property could be protected on 4167 one type of resource, but not protected on another type of resource. 4169 A computed property is one with a value defined in terms of a 4170 computation (based on the content and other properties of that 4171 resource, or even of some other resource). A computed property is 4172 always a protected property. 4174 COPY and MOVE behavior refers to local COPY and MOVE operations. 4176 For properties defined based on HTTP GET response headers (DAV:get*), 4177 the header value could include LWS as defined in [RFC2616], Section 4178 4.2. Server implementors SHOULD strip LWS from these values before 4179 using as WebDAV property values. 4181 15.1. creationdate Property 4183 Name: creationdate 4185 Purpose: Records the time and date the resource was created. 4187 Value: date-time (defined in [RFC3339], see the ABNF in section 4188 5.6.) 4190 Protected: MAY be protected. Some servers allow DAV:creationdate 4191 to be changed to reflect the time the document was created if that 4192 is more meaningful to the user (rather than the time it was 4193 uploaded). Thus, clients SHOULD NOT use this property in 4194 synchronization logic (use DAV:getetag instead). 4196 COPY/MOVE behaviour: This property value SHOULD be kept during a 4197 MOVE operation, but is normally re-initialized when a resource is 4198 created with a COPY. It should not be set in a COPY. 4200 Description: The DAV:creationdate property SHOULD be defined on all 4201 DAV compliant resources. If present, it contains a timestamp of 4202 the moment when the resource was created. Servers that are 4203 incapable of persistently recording the creation date SHOULD 4204 instead leave it undefined (i.e. report "Not Found"). 4206 4208 15.2. displayname Property 4210 Name: displayname 4212 Purpose: Provides a name for the resource that is suitable for 4213 presentation to a user. 4215 Value: Any text. 4217 Protected: SHOULD NOT be protected. Note that servers implementing 4218 [RFC2518] might have made this a protected property as this is a 4219 new requirement. 4221 COPY/MOVE behaviour: This property value SHOULD be preserved in 4222 COPY and MOVE operations. 4224 Description: Contains a description of the resource that is 4225 suitable for presentation to a user. This property is defined on 4226 the resource, and hence SHOULD have the same value independent of 4227 the Request-URI used to retrieve it (thus computing this property 4228 based on the Request-URI is deprecated). While generic clients 4229 might display the property value to end users, client UI designers 4230 must understand that the method for identifying resources is still 4231 the URL. Changes to DAV:displayname do not issue moves or copies 4232 to the server, but simply change a piece of meta-data on the 4233 individual resource. Two resources can have the same DAV: 4234 displayname value even within the same collection. 4236 4238 15.3. getcontentlanguage Property 4240 Name: getcontentlanguage 4242 Purpose: Contains the Content-Language header value (from Section 4243 14.12 of [RFC2616]) as it would be returned by a GET without 4244 accept headers. 4246 Value: language-tag (language-tag is defined in Section 3.10 of 4247 [RFC2616]). 4249 Protected: SHOULD NOT be protected, so that clients can reset the 4250 language. Note that servers implementing [RFC2518] might have 4251 made this a protected property as this is a new requirement. 4253 COPY/MOVE behaviour: This property value SHOULD be preserved in 4254 COPY and MOVE operations. 4256 Description: The DAV:getcontentlanguage property MUST be defined on 4257 any DAV compliant resource that returns the Content-Language 4258 header on a GET. 4260 4262 15.4. getcontentlength Property 4264 Name: getcontentlength 4266 Purpose: Contains the Content-Length header returned by a GET 4267 without accept headers. 4269 Value: See Section 14.13 of [RFC2616]. 4271 Protected: This property is computed, therefore protected. 4273 Description: The DAV:getcontentlength property MUST be defined on 4274 any DAV compliant resource that returns the Content-Length header 4275 in response to a GET. 4277 COPY/MOVE behaviour: This property value is dependent on the size 4278 of the destination resource, not the value of the property on the 4279 source resource. 4281 4283 15.5. getcontenttype Property 4285 Name: getcontenttype 4287 Purpose: Contains the Content-Type header value (from Section 14.17 4288 of [RFC2616]) as it would be returned by a GET without accept 4289 headers. 4291 Value: media-type (defined in Section 3.7 of [RFC2616]) 4293 Protected: Potentially protected if the server prefers to assign 4294 content types on its own (see also discussion in Section 9.7.1). 4296 COPY/MOVE behaviour: This property value SHOULD be preserved in 4297 COPY and MOVE operations. 4299 Description: This property MUST be defined on any DAV compliant 4300 resource that returns the Content-Type header in response to a 4301 GET. 4303 4305 15.6. getetag Property 4307 Name: getetag 4309 Purpose: Contains the ETag header value (from Section 14.19 of 4310 [RFC2616]) as it would be returned by a GET without accept 4311 headers. 4313 Value: entity-tag (defined in Section 3.11 of [RFC2616]) 4315 Protected: MUST be protected because this value is created and 4316 controlled by the server. 4318 COPY/MOVE behaviour: This property value is dependent on the final 4319 state of the destination resource, not the value of the property 4320 on the source resource. Also note the considerations in 4321 Section 8.8. 4323 Description: The getetag property MUST be defined on any DAV 4324 compliant resource that returns the Etag header. Refer to Section 4325 3.11 of RFC2616 for a complete definition of the semantics of an 4326 ETag, and to Section 8.6 for a discussion of ETags in WebDAV. 4328 4330 15.7. getlastmodified Property 4332 Name: getlastmodified 4334 Purpose: Contains the Last-Modified header value (from Section 4335 14.29 of [RFC2616]) as it would be returned by a GET method 4336 without accept headers. 4338 Value: rfc1123-date (defined in Section 3.3.1 of [RFC2616]) 4340 Protected: SHOULD be protected because some clients may rely on the 4341 value for appropriate caching behavior, or on the value of the 4342 Last-Modified header to which this property is linked. 4344 COPY/MOVE behaviour: This property value is dependent on the last 4345 modified date of the destination resource, not the value of the 4346 property on the source resource. Note that some server 4347 implementations use the file system date modified value for the 4348 DAV:getlastmodified value, and this can be preserved in a MOVE 4349 even when the HTTP Last-Modified value SHOULD change. Note that 4350 since [RFC2616] requires clients to use ETags where provided, a 4351 server implementing ETags can count on clients using a much better 4352 mechanism than modification dates for offline synchronization or 4353 cache control. Also note the considerations in Section 8.8. 4355 Description: Note that the last-modified date on a resource SHOULD 4356 only reflect changes in the body (the GET responses) of the 4357 resource. A change in a property only SHOULD NOT cause the last- 4358 modified date to change, because clients MAY rely on the last- 4359 modified date to know when to overwrite the existing body. The 4360 DAV:getlastmodified property MUST be defined on any DAV compliant 4361 resource that returns the Last-Modified header in response to a 4362 GET. 4364 4366 15.8. lockdiscovery Property 4368 Name: lockdiscovery 4370 Purpose: Describes the active locks on a resource 4372 Protected: MUST be protected. Clients change the list of locks 4373 through LOCK and UNLOCK, not through PROPPATCH. 4375 COPY/MOVE behaviour: The value of this property depends on the lock 4376 state of the destination, not on the locks of the source resource. 4377 Recall that locks are not moved in a MOVE operation. 4379 Description: Returns a listing of who has a lock, what type of lock 4380 he has, the timeout type and the time remaining on the timeout, 4381 and the associated lock token. Owner information MAY be omitted 4382 if it is considered sensitive. If there are no locks, but the 4383 server supports locks, the property will be present but contain 4384 zero 'activelock' elements. If there is one or more lock, an 4385 'activelock' element appears for each lock on the resource. This 4386 property is NOT lockable with respect to write locks (Section 7). 4388 4390 15.8.1. Example - Retrieving DAV:lockdiscovery 4392 >>Request 4394 PROPFIND /container/ HTTP/1.1 4395 Host: www.example.com 4396 Content-Length: xxxx 4397 Content-Type: application/xml; charset="utf-8" 4399 4400 4401 4402 4404 >>Response 4406 HTTP/1.1 207 Multi-Status 4407 Content-Type: application/xml; charset="utf-8" 4408 Content-Length: xxxx 4410 4411 4412 4413 http://www.example.com/container/ 4414 4415 4416 4417 4418 4419 4420 0 4421 Jane Smith 4422 Infinite 4423 4424 urn:uuid:f81de2ad-7f3d-a1b2-4f3c-00a0c91a9d76 4426 4427 4428 http://www.example.com/container/ 4429 4430 4431 4432 4433 HTTP/1.1 200 OK 4434 4435 4436 4438 This resource has a single exclusive write lock on it, with an 4439 infinite timeout. 4441 15.9. resourcetype Property 4443 Name: resourcetype 4445 Purpose: Specifies the nature of the resource. 4447 Protected: SHOULD be protected. Resource type is generally decided 4448 through the operation creating the resource (MKCOL vs PUT), not by 4449 PROPPATCH. 4451 COPY/MOVE behaviour: Generally a COPY/MOVE of a resource results in 4452 the same type of resource at the destination. 4454 Description: MUST be defined on all DAV compliant resources. Each 4455 child element identifies a specific type the resource belongs to, 4456 such as 'collection', which is the only resource type defined by 4457 this specification (see Section 14.3). If the element contains 4458 the 'collection' child element plus additional unrecognized 4459 elements, it should generally be treated as a collection. If the 4460 element contains no recognized child elements, it should be 4461 treated as a non-collection resource. The default value is empty. 4462 This element MUST NOT contain text or mixed content. Any custom 4463 child element is considered to be an identifier for a resource 4464 type. 4466 Example: (fictional example to show extensibility) 4468 4469 4470 4471 4473 15.10. supportedlock Property 4475 Name: supportedlock 4477 Purpose: To provide a listing of the lock capabilities supported by 4478 the resource. 4480 Protected: MUST be protected. Servers determine what lock 4481 mechanisms are supported, not clients. 4483 COPY/MOVE behaviour: This property value is dependent on the kind 4484 of locks supported at the destination, not on the value of the 4485 property at the source resource. Servers attempting to COPY to a 4486 destination should not attempt to set this property at the 4487 destination. 4489 Description: Returns a listing of the combinations of scope and 4490 access types which may be specified in a lock request on the 4491 resource. Note that the actual contents are themselves controlled 4492 by access controls so a server is not required to provide 4493 information the client is not authorized to see. This property is 4494 NOT lockable with respect to write locks (Section 7). 4496 4498 15.10.1. Example - Retrieving DAV:supportedlock 4500 >>Request 4502 PROPFIND /container/ HTTP/1.1 4503 Host: www.example.com 4504 Content-Length: xxxx 4505 Content-Type: application/xml; charset="utf-8" 4507 4508 4509 4510 4512 >>Response 4514 HTTP/1.1 207 Multi-Status 4515 Content-Type: application/xml; charset="utf-8" 4516 Content-Length: xxxx 4518 4519 4520 4521 http://www.example.com/container/ 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 HTTP/1.1 200 OK 4536 4537 4538 4540 16. Precondition/Postcondition XML Elements 4542 As introduced in Section 8.7, extra information on error conditions 4543 can be included in the body of many status responses. This section 4544 makes requirements on the use of the error body mechanism and 4545 introduces a number of precondition and postcondition codes. 4547 A "precondition" of a method describes the state of the server that 4548 must be true for that method to be performed. A "postcondition" of a 4549 method describes the state of the server that must be true after that 4550 method has been completed. 4552 Each precondition and postcondition has a unique XML element 4553 associated with it. In a 207 Multi-Status response, the XML element 4554 MUST appear inside an 'error' element in the appropriate 'propstat or 4555 'response' element depending on whether the condition applies to one 4556 or more properties or to the resource as a whole. In all other error 4557 responses where this specification's 'error' body is used, the 4558 precondition/postcondition XML element MUST be returned as the child 4559 of a top-level 'error' element in the response body, unless otherwise 4560 negotiated by the request, along with an appropriate response status. 4561 The most common response status codes are 403 (Forbidden) if the 4562 request should not be repeated because it will always fail, and 409 4563 (Conflict) if it is expected that the user might be able to resolve 4564 the conflict and resubmit the request. The 'error' element MAY 4565 contain child elements with specific error information and MAY be 4566 extended with any custom child elements. 4568 This mechanism does not take the place of using a correct numeric 4569 status code as defined here or in HTTP, because the client MUST 4570 always be able to take a reasonable course of action based only on 4571 the numeric code. However, it does remove the need to define new 4572 numeric codes. The new machine-readable codes used for this purpose 4573 are XML elements classified as preconditions and postconditions, so 4574 naturally any group defining a new condition code can use their own 4575 namespace. As always, the "DAV:" namespace is reserved for use by 4576 IETF-chartered WebDAV working groups. 4578 A server supporting this specification SHOULD use the XML error 4579 whenever a precondition or postcondition defined in this document is 4580 violated. For error conditions not specified in this document, the 4581 server MAY simply choose an appropriate numeric status and leave the 4582 response body blank. However, a server MAY instead use a custom 4583 condition code and other supporting text, because even when clients 4584 do not automatically recognize condition codes they can be quite 4585 useful in interoperability testing and debugging. 4587 Example - Response with precondition code 4588 >>Response 4590 HTTP/1.1 423 Locked 4591 Content-Type: application/xml; charset="utf-8" 4592 Content-Length: xxxx 4594 4595 4596 4597 /workspace/webdav/ 4598 4599 4601 In this example, a client unaware of a depth-infinity lock on the 4602 parent collection "/workspace/webdav/" attempted to modify the 4603 collection member "/workspace/webdav/proposal.doc". 4605 Some other useful preconditions and postconditions have been defined 4606 in other specifications extending WebDAV, such as [RFC3744] (see 4607 particularly Section 7.1.1), [RFC3253], and [RFC3648]. 4609 All these elements are in the "DAV:" namespace. If not specified 4610 otherwise, the content for each condition's XML element is defined to 4611 be empty. 4613 Name: lock-token-matches-request-uri 4615 Use with: 409 Conflict 4617 Purpose: (precondition) -- A request may include a Lock-Token header 4618 to identify a lock for the UNLOCK method. However, if the 4619 Request-URI does not fall within the scope of the lock identified 4620 by the token, the server SHOULD use this error. The lock may have 4621 a scope that does not include the Request-URI, or the lock could 4622 have disappeared, or the token may be invalid. 4624 Name: lock-token-submitted (precondition) 4626 Use with: 423 Locked 4628 Purpose: The request could not succeed because a lock token should 4629 have been submitted. This element, if present, MUST contain at 4630 least one URL of a locked resource that prevented the request. In 4631 cases of MOVE, COPY and DELETE where collection locks are 4632 involved, it can be difficult for the client to find out which 4633 locked resource made the request fail -- but the server is only 4634 resonsible for returning one such locked resource. The server MAY 4635 return every locked resource that prevented the request from 4636 succeeding if it knows them all. 4638 4640 Name: no-conflicting-lock (precondition) 4642 Use with: Typically 423 Locked 4644 Purpose: A LOCK request failed due the presence of an already 4645 existing conflicting lock. Note that a lock can be in conflict 4646 although the resource to which the request was directed is only 4647 indirectly locked. In this case, the precondition code can be 4648 used to inform the client about the resource which is the root of 4649 the conflicting lock, avoiding a separate lookup of the 4650 "lockdiscovery" property. 4652 4654 Name: no-external-entities 4656 Use with: 403 Forbidden 4658 Purpose: (precondition) -- If the server rejects a client request 4659 because the request body contains an external entity, the server 4660 SHOULD use this error. 4662 Name: preserved-live-properties 4664 Use with: 409 Conflict 4666 Purpose: (postcondition) -- The server received an otherwise-valid 4667 MOVE or COPY request, but cannot maintain the live properties with 4668 the same behavior at the destination. It may be that the server 4669 only supports some live properties in some parts of the 4670 repository, or simply has an internal error. 4672 Name: propfind-finite-depth 4674 Use with: 403 Forbidden 4676 Purpose: (precondition) -- This server does not allow infinite-depth 4677 PROPFIND requests on collections. 4679 Name: cannot-modify-protected-property 4680 Use with: 403 Forbidden 4682 Purpose: (precondition) -- The client attempted to set a protected 4683 property in a PROPPATCH (such as DAV:getetag). See also 4684 [RFC3253], Section 3.12. 4686 17. XML Extensibility in DAV 4688 The XML namespace extension ([REC-XML-NAMES]) is used in this 4689 specification in order to allow for new XML elements to be added 4690 without fear of colliding with other element names. Although WebDAV 4691 request and response bodies can be extended by arbitrary XML 4692 elements, which can be ignored by the message recipient, an XML 4693 element in the "DAV:" namespace SHOULD NOT be used in the request or 4694 response body unless that XML element is explicitly defined in an 4695 IETF RFC reviewed by a WebDAV working group. 4697 For WebDAV to be both extensibile and backwards-compatible, both 4698 clients and servers need to know how to behave when unexpected or 4699 unrecognized command extensions are received. For XML processing, 4700 this means that clients and servers MUST process received XML 4701 documents as if unexpected elements and attributes (and all children 4702 of unrecognized elements) were not there. An unexpected element or 4703 attribute includes one which may be used in another context but is 4704 not expected here. Ignoring such items for purposes of processing 4705 can of course be consistent with logging all information or 4706 presenting for debugging. 4708 This restriction also applies to the processing, by clients, of DAV 4709 property values where unexpected XML elements SHOULD be ignored 4710 unless the property's schema declares otherwise. 4712 This restriction does not apply to setting dead DAV properties on the 4713 server where the server MUST record all XML elements. 4715 Additionally, this restriction does not apply to the use of XML where 4716 XML happens to be the content type of the entity body, for example, 4717 when used as the body of a PUT. 4719 Processing instructions in XML SHOULD be ignored by recipients. 4720 Thus, specifications extending WebDAV SHOULD NOT use processing 4721 instructions to define normative behavior. 4723 XML DTD fragments are included for all the XML elements defined in 4724 this specification. However, correct XML will not be valid according 4725 to any DTD due to namespace usage and extension rules. In 4726 particular: 4728 o Elements (from this specification) are in the "DAV:" namespace, 4730 o Element ordering is irrelevant unless otherwise stated, 4732 o Extension attributes MAY be added, 4733 o For element type definitions of "ANY", the normative text 4734 definition for that element defines what can be in it and what 4735 that means. 4737 o For element type definitions of "#PCDATA", extension elements MUST 4738 NOT be added. 4740 o For other element type definitions, including "EMPTY", extension 4741 elements MAY be added. 4743 Note that this means that elements containing elements cannot be 4744 extended to contain text, and vice versa. 4746 With DTD validation relaxed by the rules above, the constraints 4747 described by the DTD fragments are normative (see for example 4748 Appendix A). A recipient of a WebDAV message with an XML body MUST 4749 NOT validate the XML document according to any hard-coded or 4750 dynamically-declared DTD. 4752 Note that this section describes backwards-compatible extensibility 4753 rules. There might also be times when an extension is designed not 4754 to be backwards-compatible, for example defining an extension that 4755 reuses an XML element defined in this document but omitting one of 4756 the child elements required by the DTDs in this specification. 4758 18. DAV Compliance Classes 4760 A DAV compliant resource can advertise several classes of compliance. 4761 A client can discover the compliance classes of a resource by 4762 executing OPTIONS on the resource, and examining the "DAV" header 4763 which is returned. Note particularly that resources are spoken of as 4764 being compliant, rather than servers. That is because theoretically 4765 some resources on a server could support different feature sets. 4766 E.g. a server could have a sub-repository where an advanced feature 4767 like versioning was supported, even if that feature was not supported 4768 on all sub-repositories. 4770 Since this document describes extensions to the HTTP/1.1 protocol, 4771 minimally all DAV compliant resources, clients, and proxies MUST be 4772 compliant with [RFC2616]. 4774 A resource that is class 2 or class 3 compliant must also be class 1 4775 compliant. 4777 18.1. Class 1 4779 A class 1 compliant resource MUST meet all "MUST" requirements in all 4780 sections of this document. 4782 Class 1 compliant resources MUST return, at minimum, the value "1" in 4783 the DAV header on all responses to the OPTIONS method. 4785 18.2. Class 2 4787 A class 2 compliant resource MUST meet all class 1 requirements and 4788 support the LOCK method, the DAV:supportedlock property, the DAV: 4789 lockdiscovery property, the Time-Out response header and the Lock- 4790 Token request header. A class "2" compliant resource SHOULD also 4791 support the Time-Out request header and the 'owner' XML element. 4793 Class 2 compliant resources MUST return, at minimum, the values "1" 4794 and "2" in the DAV header on all responses to the OPTIONS method. 4796 18.3. Class 3 4798 A resource can explicitly advertise its support for the revisions to 4799 [RFC2518] made in this document. Class 1 MUST be supported as well. 4800 Class 2 MAY be supported. Advertising class 3 support in addition to 4801 class 1 and 2 means that the server supports all the requirements in 4802 this specification. Advertising class 3 and class 1 support, but not 4803 class 2, means that the server supports all the requirements in this 4804 specification except possibly those that involve locking support. 4806 Example: 4808 DAV: 1, 3 4810 19. Internationalization Considerations 4812 In the realm of internationalization, this specification complies 4813 with the IETF Character Set Policy [RFC2277]. In this specification, 4814 human-readable fields can be found either in the value of a property, 4815 or in an error message returned in a response entity body. In both 4816 cases, the human-readable content is encoded using XML, which has 4817 explicit provisions for character set tagging and encoding, and 4818 requires that XML processors read XML elements encoded, at minimum, 4819 using the UTF-8 [RFC3629] and UTF-16 encodings of the ISO 10646 4820 multilingual plane. XML examples in this specification demonstrate 4821 use of the charset parameter of the Content-Type header, as defined 4822 in [RFC3023], as well as the XML declarations which provide charset 4823 identification information for MIME and XML processors. 4825 XML also provides a language tagging capability for specifying the 4826 language of the contents of a particular XML element. The "xml:lang" 4827 attribute appears on an XML element to identify the language of its 4828 content and attributes. See [REC-XML] for definitions of values and 4829 scoping. 4831 WebDAV applications MUST support the character set tagging, character 4832 set encoding, and the language tagging functionality of the XML 4833 specification. Implementors of WebDAV applications are strongly 4834 encouraged to read "XML Media Types" [RFC3023] for instruction on 4835 which MIME media type to use for XML transport, and on use of the 4836 charset parameter of the Content-Type header. 4838 Names used within this specification fall into four categories: names 4839 of protocol elements such as methods and headers, names of XML 4840 elements, names of properties, and names of conditions. Naming of 4841 protocol elements follows the precedent of HTTP, using English names 4842 encoded in USASCII for methods and headers. Since these protocol 4843 elements are not visible to users, and are simply long token 4844 identifiers, they do not need to support multiple languages. 4845 Similarly, the names of XML elements used in this specification are 4846 not visible to the user and hence do not need to support multiple 4847 languages. 4849 WebDAV property names are qualified XML names (pairs of XML namespace 4850 name and local name). Although some applications (e.g., a generic 4851 property viewer) will display property names directly to their users, 4852 it is expected that the typical application will use a fixed set of 4853 properties, and will provide a mapping from the property name and 4854 namespace to a human-readable field when displaying the property name 4855 to a user. It is only in the case where the set of properties is not 4856 known ahead of time that an application need display a property name 4857 to a user. We recommend that applications provide human-readable 4858 property names wherever feasible. 4860 For error reporting, we follow the convention of HTTP/1.1 status 4861 codes, including with each status code a short, English description 4862 of the code (e.g., 423 (Locked)). While the possibility exists that 4863 a poorly crafted user agent would display this message to a user, 4864 internationalized applications will ignore this message, and display 4865 an appropriate message in the user's language and character set. 4867 Since interoperation of clients and servers does not require locale 4868 information, this specification does not specify any mechanism for 4869 transmission of this information. 4871 20. Security Considerations 4873 This section is provided to detail issues concerning security 4874 implications of which WebDAV applications need to be aware. 4876 All of the security considerations of HTTP/1.1 (discussed in 4877 [RFC2616]) and XML (discussed in [RFC3023]) also apply to WebDAV. In 4878 addition, the security risks inherent in remote authoring require 4879 stronger authentication technology, introduce several new privacy 4880 concerns, and may increase the hazards from poor server design. 4881 These issues are detailed below. 4883 20.1. Authentication of Clients 4885 Due to their emphasis on authoring, WebDAV servers need to use 4886 authentication technology to protect not just access to a network 4887 resource, but the integrity of the resource as well. Furthermore, 4888 the introduction of locking functionality requires support for 4889 authentication. 4891 A password sent in the clear over an insecure channel is an 4892 inadequate means for protecting the accessibility and integrity of a 4893 resource as the password may be intercepted. Since Basic 4894 authentication for HTTP/1.1 performs essentially clear text 4895 transmission of a password, Basic authentication MUST NOT be used to 4896 authenticate a WebDAV client to a server unless the connection is 4897 secure. Furthermore, a WebDAV server MUST NOT send a Basic 4898 authentication challenge in a WWW-Authenticate header unless the 4899 connection is secure. An example of a secure connection would be a 4900 Transport Layer Security (TLS) connection employing a strong cipher 4901 suite and server authentication. 4903 WebDAV applications MUST support the Digest authentication scheme 4904 [RFC2617]. Since Digest authentication verifies that both parties to 4905 a communication know a shared secret, a password, without having to 4906 send that secret in the clear, Digest authentication avoids the 4907 security problems inherent in Basic authentication while providing a 4908 level of authentication which is useful in a wide range of scenarios. 4910 20.2. Denial of Service 4912 Denial of service attacks are of special concern to WebDAV servers. 4913 WebDAV plus HTTP enables denial of service attacks on every part of a 4914 system's resources. 4916 o The underlying storage can be attacked by PUTting extremely large 4917 files. 4919 o Asking for recursive operations on large collections can attack 4920 processing time. 4922 o Making multiple pipelined requests on multiple connections can 4923 attack network connections. 4925 WebDAV servers need to be aware of the possibility of a denial of 4926 service attack at all levels. The proper response to such an attack 4927 MAY be to simply drop the connection, or if the server is able to 4928 make a response, the server MAY use a 400-level status request such 4929 as 400 (Bad Request) and indicate why the request was refused (a 500- 4930 level status response would indicate that the problem is with the 4931 server, whereas unintentional DOS attacks are something the client is 4932 capable of remedying). 4934 20.3. Security through Obscurity 4936 WebDAV provides, through the PROPFIND method, a mechanism for listing 4937 the member resources of a collection. This greatly diminishes the 4938 effectiveness of security or privacy techniques that rely only on the 4939 difficulty of discovering the names of network resources. Users of 4940 WebDAV servers are encouraged to use access control techniques to 4941 prevent unwanted access to resources, rather than depending on the 4942 relative obscurity of their resource names. 4944 20.4. Privacy Issues Connected to Locks 4946 When submitting a lock request a user agent may also submit an 4947 'owner' XML field giving contact information for the person taking 4948 out the lock (for those cases where a person, rather than a robot, is 4949 taking out the lock). This contact information is stored in a DAV: 4950 lockdiscovery property on the resource, and can be used by other 4951 collaborators to begin negotiation over access to the resource. 4952 However, in many cases this contact information can be very private, 4953 and should not be widely disseminated. Servers SHOULD limit read 4954 access to the DAV:lockdiscovery property as appropriate. 4955 Furthermore, user agents SHOULD provide control over whether contact 4956 information is sent at all, and if contact information is sent, 4957 control over exactly what information is sent. 4959 20.5. Privacy Issues Connected to Properties 4961 Since property values are typically used to hold information such as 4962 the author of a document, there is the possibility that privacy 4963 concerns could arise stemming from widespread access to a resource's 4964 property data. To reduce the risk of inadvertent release of private 4965 information via properties, servers are encouraged to develop access 4966 control mechanisms that separate read access to the resource body and 4967 read access to the resource's properties. This allows a user to 4968 control the dissemination of their property data without overly 4969 restricting access to the resource's contents. 4971 20.6. Implications of XML Entities 4973 XML supports a facility known as "external entities", defined in 4974 Section 4.2.2 of [REC-XML], which instruct an XML processor to 4975 retrieve and include additional XML. An external XML entity can be 4976 used to append or modify the document type declaration (DTD) 4977 associated with an XML document. An external XML entity can also be 4978 used to include XML within the content of an XML document. For non- 4979 validating XML, such as the XML used in this specification, including 4980 an external XML entity is not required by XML. However, XML does 4981 state that an XML processor may, at its discretion, include the 4982 external XML entity. 4984 External XML entities have no inherent trustworthiness and are 4985 subject to all the attacks that are endemic to any HTTP GET request. 4986 Furthermore, it is possible for an external XML entity to modify the 4987 DTD, and hence affect the final form of an XML document, in the worst 4988 case significantly modifying its semantics, or exposing the XML 4989 processor to the security risks discussed in [RFC3023]. Therefore, 4990 implementers must be aware that external XML entities should be 4991 treated as untrustworthy. If a server implementor chooses not to 4992 handle external XML entities, it SHOULD respond to requests 4993 containing external entities with the 'no-external-entities' 4994 condition code. 4996 There is also the scalability risk that would accompany a widely 4997 deployed application which made use of external XML entities. In 4998 this situation, it is possible that there would be significant 4999 numbers of requests for one external XML entity, potentially 5000 overloading any server which fields requests for the resource 5001 containing the external XML entity. 5003 Furthermore, there's also a risk based on the evaluation of "internal 5004 entities" as defined in Section 4.2.2 of [REC-XML]. A small, 5005 carefully crafted request using nested internal entities may require 5006 enormous amounts of memory and/or processing time to process. Server 5007 implementors should be aware of this risk and configure their XML 5008 parsers so that requests like these can be detected and rejected as 5009 early as possible. 5011 20.7. Risks Connected with Lock Tokens 5013 This specification encourages the use of "A Universally Unique 5014 Identifier (UUID) URN Namespace" ([RFC4122]) for lock tokens 5015 (Section 6.5), in order to guarantee their uniqueness across space 5016 and time. Version 1 UUIDs (defined in Section 4) MAY contain a 5017 "node" field that "consists of an IEEE 802 MAC address, usually the 5018 host address. For systems with multiple IEEE addresses, any 5019 available one can be used". Since a WebDAV server will issue many 5020 locks over its lifetime, the implication is that it may also be 5021 publicly exposing its IEEE 802 address. 5023 There are several risks associated with exposure of IEEE 802 5024 addresses. Using the IEEE 802 address: 5026 o It is possible to track the movement of hardware from subnet to 5027 subnet. 5029 o It may be possible to identify the manufacturer of the hardware 5030 running a WebDAV server. 5032 o It may be possible to determine the number of each type of 5033 computer running WebDAV. 5035 This risk only applies to host address based UUID versions. Section 5036 4 of [RFC4122] describes several other mechanisms for generating 5037 UUIDs that do not involve the host address and therefore do not 5038 suffer from this risk. 5040 20.8. Hosting Malicious Content 5042 HTTP has the ability to host programs which are executed on client 5043 machines. These programs can take many forms including web scripts, 5044 executables, plug in modules, and macros in documents. WebDAV does 5045 not change any of the security concerns around these programs yet 5046 often WebDAV is used in contexts where a wide range of users can 5047 publish documents on a server. The server might not have a close 5048 trust relationship with the author that is publishing the document. 5049 Servers that allow clients to publish arbitrary content can usefully 5050 implement precautions to check that content published to the server 5051 is not harmful to other clients. Servers could do this by techniques 5052 such as restricting the types of content that is allowed to be 5053 published and running virus and malware detection software on 5054 published content. Servers can also mitigate the risk by having 5055 appropriate access restriction and authentication of users that are 5056 allowed to publish content to the server. 5058 21. IANA Considerations 5060 21.1. New URI Schemes 5062 This specification defines two URI schemes: 5064 1. the "opaquelocktoken" scheme defined in Appendix C, and 5066 2. the "DAV" URI scheme, which historically was used in [RFC2518] to 5067 disambiguate WebDAV property and XML element names and which 5068 continues to be used for that purpose in this specification and 5069 others extending WebDAV. Creation of identifiers in the "DAV:" 5070 namespace is controlled by the IETF. 5072 Note that defining new URI schemes for XML namespaces is now 5073 discouraged. "DAV:" was defined before standard best practices 5074 emerged. 5076 21.2. XML Namespaces 5078 XML namespaces disambiguate WebDAV property names and XML elements. 5079 Any WebDAV user or application can define a new namespace in order to 5080 create custom properties or extend WebDAV XML syntax. IANA does not 5081 need to manage such namespaces, property names or element names. 5083 21.3. Message Header Fields 5085 The message header fields below should be added to the permanent 5086 registry (see [RFC3864]). 5088 21.3.1. DAV 5090 Header field name: DAV 5092 Applicable protocol: http 5094 Status: standard 5096 Author/Change controller: IETF 5098 Specification document: this specification (Section 10.1) 5100 21.3.2. Depth 5102 Header field name: Depth 5104 Applicable protocol: http 5105 Status: standard 5107 Author/Change controller: IETF 5109 Specification document: this specification (Section 10.2) 5111 21.3.3. Destination 5113 Header field name: Destination 5115 Applicable protocol: http 5117 Status: standard 5119 Author/Change controller: IETF 5121 Specification document: this specification (Section 10.3) 5123 21.3.4. If 5125 Header field name: If 5127 Applicable protocol: http 5129 Status: standard 5131 Author/Change controller: IETF 5133 Specification document: this specification (Section 10.4) 5135 21.3.5. Lock-Token 5137 Header field name: Lock-Token 5139 Applicable protocol: http 5141 Status: standard 5143 Author/Change controller: IETF 5145 Specification document: this specification (Section 10.5) 5147 21.3.6. Overwrite 5149 Header field name: Overwrite 5151 Applicable protocol: http 5152 Status: standard 5154 Author/Change controller: IETF 5156 Specification document: this specification (Section 10.6) 5158 21.3.7. Timeout 5160 Header field name: Timeout 5162 Applicable protocol: http 5164 Status: standard 5166 Author/Change controller: IETF 5168 Specification document: this specification (Section 10.7) 5170 22. Acknowledgements 5172 A specification such as this thrives on piercing critical review and 5173 withers from apathetic neglect. The authors gratefully acknowledge 5174 the contributions of the following people, whose insights were so 5175 valuable at every stage of our work. 5177 Contributors to RFC2518 5179 Terry Allen, Harald Alvestrand, Jim Amsden, Becky Anderson, Alan 5180 Babich, Sanford Barr, Dylan Barrell, Bernard Chester, Tim Berners- 5181 Lee, Dan Connolly, Jim Cunningham, Ron Daniel, Jr., Jim Davis, Keith 5182 Dawson, Mark Day, Brian Deen, Martin Duerst, David Durand, Lee 5183 Farrell, Chuck Fay, Wesley Felter, Roy Fielding, Mark Fisher, Alan 5184 Freier, George Florentine, Jim Gettys, Phill Hallam-Baker, Dennis 5185 Hamilton, Steve Henning, Mead Himelstein, Alex Hopmann, Andre van der 5186 Hoek, Ben Laurie, Paul Leach, Ora Lassila, Karen MacArthur, Steven 5187 Martin, Larry Masinter, Michael Mealling, Keith Moore, Thomas Narten, 5188 Henrik Nielsen, Kenji Ota, Bob Parker, Glenn Peterson, Jon Radoff, 5189 Saveen Reddy, Henry Sanders, Christopher Seiwald, Judith Slein, Mike 5190 Spreitzer, Einar Stefferud, Greg Stein, Ralph Swick, Kenji Takahashi, 5191 Richard N. Taylor, Robert Thau, John Turner, Sankar Virdhagriswaran, 5192 Fabio Vitali, Gregory Woodhouse, and Lauren Wood. 5194 Two from this list deserve special mention. The contributions by 5195 Larry Masinter have been invaluable, both in helping the formation of 5196 the working group and in patiently coaching the authors along the 5197 way. In so many ways he has set high standards we have toiled to 5198 meet. The contributions of Judith Slein in clarifying the 5199 requirements, and in patiently reviewing draft after draft, both 5200 improved this specification and expanded our minds on document 5201 management. 5203 We would also like to thank John Turner for developing the XML DTD. 5205 The authors of RFC2518 were Yaron Goland, Jim Whitehead, A. Faizi, 5206 Steve Carter and D. Jensen. Although their names had to be removed 5207 due to IETF author count restrictions they can take credit for the 5208 majority of the design of WebDAV. 5210 Additional Acknowledgements for This Specification 5212 Significant contributors of text for this specification are listed as 5213 contributors in the section below. We must also gratefully 5214 acknowledge Geoff Clemm, Joel Soderberg, and Dan Brotsky for hashing 5215 out specific text on the list or in meetings. Joe Hildebrand and 5216 Cullen Jennings helped close many issues. Barry Lind described an 5217 additional security consideration and Cullen Jennings provided text 5218 for that consideration. Jason Crawford tracked issue status for this 5219 document for a period of years, followed by Elias Sinderson. 5221 23. Contributors to This Specification 5223 Julian Reschke, 5224 bytes GmbH, 5225 Hafenweg 16, 48155 Muenster, Germany, 5226 Email: julian.reschke@greenbytes.de 5228 Elias Sinderson 5229 University of California, Santa Cruz 5230 1156 High Street, Santa Cruz, CA 95064 5231 Email: elias@cse.ucsc.edu 5233 Jim Whitehead, 5234 University of California, Santa Cruz 5235 1156 High Street, Santa Cruz, CA 95064 5236 Email: ejw@soe.ucsc.edu 5238 24. Authors of RFC2518 5240 Y. Y. Goland, 5241 Microsoft Corporation, 5242 One Microsoft Way, 5243 Redmond, WA 98052-6399. 5244 Email: yarong@microsoft.com. 5246 E. J. Whitehead, Jr., 5247 Dept. Of Information and Computer Science, 5248 University of California, Irvine, 5249 Irvine, CA 92697-3425. 5250 Email: ejw@ics.uci.edu. 5252 A. Faizi, 5253 Netscape, 5254 685 East Middlefield Road, 5255 Mountain View, CA 94043. 5256 Email: asad@netscape.com. 5258 S. R. Carter, 5259 Novell, 5260 1555 N. Technology Way, 5261 M/S ORM F111, 5262 Orem, UT 84097-2399. 5263 Email: srcarter@novell.com. 5265 D. Jensen, 5266 Novell, 5267 1555 N. Technology Way, 5268 M/S ORM F111, 5269 Orem, UT 84097-2399. 5270 Email: dcjensen@novell.com. 5272 25. References 5274 25.1. Normative References 5276 [REC-XML] Bray, T., Paoli, J., Sperberg-McQueen, C., Maler, E., and 5277 F. Yergeau, "Extensible Markup Language (XML) 1.0 (Third 5278 Edition)", W3C REC-xml-20040204, February 2004, 5279 . 5281 [REC-XML-INFOSET] 5282 Cowan, J. and R. Tobin, "XML Information Set (Second 5283 Edition)", W3C REC-xml-infoset-20040204, February 2004, 5284 . 5286 [REC-XML-NAMES] 5287 Bray, T., Hollander, D., and A. Layman, "Namespaces in 5288 XML", W3C REC-xml-names-19990114, January 1999, 5289 . 5291 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 5292 Requirement Levels", BCP 14, RFC 2119, March 1997. 5294 [RFC2277] Alvestrand, H., "IETF Policy on Character Sets and 5295 Languages", BCP 18, RFC 2277, January 1998. 5297 [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., 5298 Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext 5299 Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. 5301 [RFC2617] Franks, J., Hallam-Baker, P., Hostetler, J., Lawrence, S., 5302 Leach, P., Luotonen, A., and L. Stewart, "HTTP 5303 Authentication: Basic and Digest Access Authentication", 5304 RFC 2617, June 1999. 5306 [RFC3339] Klyne, G., Ed. and C. Newman, "Date and Time on the 5307 Internet: Timestamps", RFC 3339, July 2002. 5309 [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO 5310 10646", STD 63, RFC 3629, November 2003. 5312 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 5313 Resource Identifier (URI): Generic Syntax", STD 66, 5314 RFC 3986, January 2005. 5316 [RFC4122] Leach, P., Mealling, M., and R. Salz, "A Universally 5317 Unique IDentifier (UUID) URN Namespace", RFC 4122, 5318 July 2005. 5320 25.2. Informational References 5322 [RFC2291] Slein, J., Vitali, F., Whitehead, E., and D. Durand, 5323 "Requirements for a Distributed Authoring and Versioning 5324 Protocol for the World Wide Web", RFC 2291, February 1998. 5326 [RFC2518] Goland, Y., Whitehead, E., Faizi, A., Carter, S., and D. 5327 Jensen, "HTTP Extensions for Distributed Authoring -- 5328 WEBDAV", RFC 2518, February 1999. 5330 [RFC3023] Murata, M., St. Laurent, S., and D. Kohn, "XML Media 5331 Types", RFC 3023, January 2001. 5333 [RFC3253] Clemm, G., Amsden, J., Ellison, T., Kaler, C., and J. 5334 Whitehead, "Versioning Extensions to WebDAV (Web 5335 Distributed Authoring and Versioning)", RFC 3253, 5336 March 2002. 5338 [RFC3648] Whitehead, J. and J. Reschke, Ed., "Web Distributed 5339 Authoring and Versioning (WebDAV) Ordered Collections 5340 Protocol", RFC 3648, December 2003. 5342 [RFC3744] Clemm, G., Reschke, J., Sedlar, E., and J. Whitehead, "Web 5343 Distributed Authoring and Versioning (WebDAV) Access 5344 Control Protocol", RFC 3744, May 2004. 5346 [RFC3864] Klyne, G., Nottingham, M., and J. Mogul, "Registration 5347 Procedures for Message Header Fields", BCP 90, RFC 3864, 5348 September 2004. 5350 Appendix A. Notes on Processing XML Elements 5352 A.1. Notes on Empty XML Elements 5354 XML supports two mechanisms for indicating that an XML element does 5355 not have any content. The first is to declare an XML element of the 5356 form . The second is to declare an XML element of the form 5357 . The two XML elements are semantically identical. 5359 A.2. Notes on Illegal XML Processing 5361 XML is a flexible data format that makes it easy to submit data that 5362 appears legal but in fact is not. The philosophy of "Be flexible in 5363 what you accept and strict in what you send" still applies, but it 5364 must not be applied inappropriately. XML is extremely flexible in 5365 dealing with issues of white space, element ordering, inserting new 5366 elements, etc. This flexibility does not require extension, 5367 especially not in the area of the meaning of elements. 5369 There is no kindness in accepting illegal combinations of XML 5370 elements. At best it will cause an unwanted result and at worst it 5371 can cause real damage. 5373 A.3. Example - XML Syntax Error 5375 The following request body for a PROPFIND method is illegal. 5377 5378 5379 5380 5381 5383 The definition of the propfind element only allows for the allprop or 5384 the propname element, not both. Thus the above is an error and must 5385 be responded to with a 400 (Bad Request). 5387 Imagine, however, that a server wanted to be "kind" and decided to 5388 pick the allprop element as the true element and respond to it. A 5389 client running over a bandwidth limited line who intended to execute 5390 a propname would be in for a big surprise if the server treated the 5391 command as an allprop. 5393 Additionally, if a server were lenient and decided to reply to this 5394 request, the results would vary randomly from server to server, with 5395 some servers executing the allprop directive, and others executing 5396 the propname directive. This reduces interoperability rather than 5397 increasing it. 5399 A.4. Example - Unexpected XML Element 5401 The previous example was illegal because it contained two elements 5402 that were explicitly banned from appearing together in the propfind 5403 element. However, XML is an extensible language, so one can imagine 5404 new elements being defined for use with propfind. Below is the 5405 request body of a PROPFIND and, like the previous example, must be 5406 rejected with a 400 (Bad Request) by a server that does not 5407 understand the expired-props element. 5409 5410 5412 5413 5415 To understand why a 400 (Bad Request) is returned let us look at the 5416 request body as the server unfamiliar with expired-props sees it. 5418 5419 5421 5423 As the server does not understand the 'expired-props' element, 5424 according to the WebDAV-specific XML processing rules specified in 5425 Section 17, it must process the request as if the element were not 5426 there. Thus the server sees an empty propfind, which by the 5427 definition of the propfind element is illegal. 5429 Please note that had the extension been additive it would not 5430 necessarily have resulted in a 400 (Bad Request). For example, 5431 imagine the following request body for a PROPFIND: 5433 5434 5436 5437 *boss* 5438 5440 The previous example contains the fictitious element leave-out. Its 5441 purpose is to prevent the return of any property whose name matches 5442 the submitted pattern. If the previous example were submitted to a 5443 server unfamiliar with 'leave-out', the only result would be that the 5444 'leave-out' element would be ignored and a propname would be 5445 executed. 5447 Appendix B. Notes on HTTP Client Compatibility 5449 WebDAV was designed to be, and has been found to be, backward- 5450 compatible with HTTP 1.1. The PUT and DELETE methods are defined in 5451 HTTP and thus may be used by HTTP clients as well as WebDAV-aware 5452 clients, but the responses to PUT and DELETE have been extended in 5453 this specification in ways that only a WebDAV client would be 5454 entirely prepared for. Some theoretical concerns were raised about 5455 whether those responses would cause interoperability problems with 5456 HTTP-only clients, and this section addresses those concerns. 5458 Since any HTTP client ought to handle unrecognized 400-level and 500- 5459 level status codes as errors, the following new status codes should 5460 not present any issues: 422, 423 and 507 (424 is also a new status 5461 code but it appears only in the body of a Multistatus response.) So, 5462 for example, if a HTTP client attempted to PUT or DELETE a locked 5463 resource, the 423 Locked response ought to result in a generic error 5464 presented to the user. 5466 The 207 Multistatus response is interesting because a HTTP client 5467 issuing a DELETE request to a collection might interpret a 207 5468 response as a success, even though it does not realize the resource 5469 is a collection and cannot understand that the DELETE operation might 5470 have been a complete or partial failure. That interpretation isn't 5471 entirely justified, because a 200-level response indicates that the 5472 server "received, understood and accepted" the request, not that the 5473 request resulted in complete success. 5475 One option is that a server could treat a DELETE of a collection as 5476 an atomic operation, and use either 204 No Content in case of 5477 success, or some appropriate error response (400 or 500 level) for an 5478 error. This approach would indeed maximize backward compatibility. 5479 However, since interoperability tests and working group discussions 5480 have not turned up any instances of HTTP clients issuing a DELETE 5481 request against a WebDAV collection, this concern is more theoretical 5482 than practical. Thus, servers are likely to be completely successful 5483 at interoperating with HTTP clients even if they treat any collection 5484 DELETE request as a WebDAV request and send a 207 Multistatus 5485 response. 5487 In general server implementations are encouraged to use the detailed 5488 responses and other mechanisms defined in this document rather than 5489 make changes for theoretical interoperability concerns. 5491 Appendix C. The 'opaquelocktoken' Scheme and URIs 5493 The 'opaquelocktoken' URI scheme was defined in [RFC2518] (and 5494 registered by IANA) in order to create syntactically correct and 5495 easy-to-generate URIs out of UUIDs, intended to be used as lock 5496 tokens and to be unique across all resources for all time. 5498 An opaquelocktoken URI is constructed by concatenating the 5499 'opaquelocktoken' scheme with a UUID, along with an optional 5500 extension. Servers can create new UUIDs for each new lock token. If 5501 a server wishes to reuse UUIDs the server MUST add an extension and 5502 the algorithm generating the extension MUST guarantee that the same 5503 extension will never be used twice with the associated UUID. 5505 OpaqueLockToken-URI = "opaquelocktoken:" UUID [Extension] 5506 ; UUID is defined in Section 3 of [RFC4122]. Note that LWS 5507 ; is not allowed between elements of 5508 ; this production. 5510 Extension = path 5511 ; path is defined in Section 3.3 of [RFC3986] 5513 Appendix D. Lock-null Resources 5515 The original WebDAV model for locking unmapped URLs created "lock- 5516 null resources". This model was over-complicated and some 5517 interoperability and implementation problems were discovered. The 5518 new WebDAV model for locking unmapped URLs (see Section 7.3) creates 5519 "locked empty resources". Lock-null resources are deprecated. This 5520 section discusses the original model briefly because clients MUST be 5521 able to handle either model. 5523 In the original "lock-null resource" model, which is no longer 5524 recommended for implementation: 5526 o A lock-null resource sometimes appeared as "Not Found". The 5527 server responds with a 404 or 405 to any method except for PUT, 5528 MKCOL, OPTIONS, PROPFIND, LOCK, UNLOCK. 5530 o A lock-null resource does however show up as a member of its 5531 parent collection. 5533 o The server removes the lock-null resource entirely (its URI 5534 becomes unmapped) if its lock goes away before it is converted to 5535 a regular resource. Recall that locks go away not only when they 5536 expire or are unlcoked, but are also removed if a resource is 5537 renamed or moved, or if any parent collection is renamed or moved. 5539 o The server converts the lock-null resource into a regular resource 5540 if a PUT request to the URL is successful. 5542 o The server converts the lock-null resource into a collection if a 5543 MKCOL request to the URL is successful (though interoperability 5544 experience showed that not all servers followed this requirement). 5546 o Property values were defined for DAV:lockdiscovery and DAV: 5547 supportedlock properties but not necessarily for other properties 5548 like DAV:getcontenttype. 5550 Clients can easily interoperate both with servers that support the 5551 old model "lock-null resources" and the recommended model of "locked 5552 empty resources" by only attempting PUT after a LOCK to an unmapped 5553 URL, not MKCOL or GET. 5555 D.1. Guidance for Clients Using LOCK to Create Resources 5557 A WebDAV client implemented to this specification might find servers 5558 that create lock-null resources (implemented before this 5559 specification using [RFC2518]) as well as servers that create locked 5560 empty resources. The response to the LOCK request will not indicate 5561 what kind of resource was created. There are a few techniques which 5562 help the client deal with either type. 5564 If the client wishes to avoid accidentally creating either lock- 5565 null or empty locked resources, an "If-Match: *" header can be 5566 included with LOCK requests to prevent the server from creating a 5567 new resource. 5569 If a LOCK request creates a resource and the client subsequently 5570 wants to overwrite that resource using a COPY or MOVE request, the 5571 client should include an "Overwrite: T" header. 5573 If a LOCK request creates a resource and the client then decides 5574 to get rid of that resource, a DELETE request is supposed to fail 5575 on a lock-null resource and UNLOCK should be used instead. But 5576 with a locked empty resource, UNLOCK doesn't make the resource 5577 disappear. Therefore, the client might have to try both requests 5578 and ignore an error in one of the two requests. 5580 Appendix E. Guidance for Clients Desiring to Authenticate 5582 Many WebDAV clients already implemented have account settings 5583 (similar to the way email clients store IMAP account settings). 5584 Thus, the WebDAV client would be able to authenticate with its first 5585 couple requests to the server, provided it had a way to get the 5586 authentication challenge from the server with realm name, nonce and 5587 other challenge information. Note that the results of some requests 5588 might vary according to whether the client is authenticated or not -- 5589 a PROPFIND might return more visible resources if the client is 5590 authenticated, yet not fail if the client is anonymous. 5592 There are a number of ways the client might be able to trigger the 5593 server do provide an authentication challenge. This appendix 5594 describes a couple approaches that seem particularly likely to work. 5596 The first approach is to perform a request that ought to require 5597 authentication. However, it's possible that a server might handle 5598 any request even without authentication, so to be entirely safe the 5599 client could add a conditional header to ensure that even if the 5600 request passes permissions checks it's not actually handled by the 5601 server. An example of following this approach would be to use a PUT 5602 request with an "If-Match" header with a made-up ETag value. This 5603 approach might fail to result in an authentication challenge if the 5604 server does not test authorization before testing conditionals as is 5605 required (see Section 8.5), or if the server does not need to test 5606 authorization. 5608 Example - forcing auth challenge with write request 5610 >>Request 5612 PUT /forceauth.txt HTTP/1.1 5613 Host: www.example.com 5614 If-Match: "xxx" 5615 Content-Type: text/plain 5616 Content-Length: 0 5618 The second approach is to use an Authorization header (defined in 5619 [RFC2617]) which is likely to be rejected by the server but which 5620 will then prompt a proper authentication challenge. For example, the 5621 client could start with a PROPFIND request containing an 5622 Authorization header containing a made-up Basic userid:password 5623 string or with actual plausible credentials. This approach relies on 5624 the server responding with a "401 Unauthorized" along with a 5625 challenge if it receives an Authorization header with an unrecognized 5626 username, invalid password, or if it doesn't even handle Basic 5627 authentication. This seems likely to work because of the 5628 requirements of RFC2617: 5630 "If the origin server does not wish to accept the credentials sent 5631 with a request, it SHOULD return a 401 (Unauthorized) response. The 5632 response MUST include a WWW-Authenticate header field containing at 5633 least one (possibly new) challenge applicable to the requested 5634 resource." 5636 There's a slight problem with implementing that recommendation in 5637 some cases, because some servers do not even have challenge 5638 information for certain resources. Thus, when there's no way to 5639 authenticate to a resource or the resource is entirely publicly 5640 available over all accepted methods, the server MAY ignore the 5641 Authorization header, and the client presumably try again later. 5643 Example - forcing auth challenge with Authorization header 5645 >>Request 5647 PROPFIND /docs/ HTTP/1.1 5648 Host: www.example.com 5649 Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ== 5650 Content-type: application/xml; charset="utf-8" 5651 Content-Length: xxxx 5653 [body omitted] 5655 Appendix F. Summary of changes from RFC2518 5657 This section lists major changes between this document and RFC2518, 5658 starting with those that are likely to result in implementation 5659 changes. Servers will advertise support for all changes in this 5660 specification by returning the compliance class "3" in the DAV 5661 response header (see Sections 10.1 and 18.3). 5663 F.1. Changes for both Client and Server Implementations 5665 Collections and Namespace Operations 5667 o The semantics of PROPFIND 'allprop' (Section 9.1) have been 5668 relaxed so that servers return results including, at a minimum, 5669 the live properties defined in this specification, but not 5670 necessarily return other live properties. The 'allprop' directive 5671 therefore means something more like "return all properties that 5672 are supposed to be returned when 'allprop' is requested" -- a set 5673 of properties which may include custom properties and properties 5674 defined in other specifications if those other specifications so 5675 require. Related to this, 'allprop' requests can now be extended 5676 with the 'include' syntax to include specific named properties, 5677 thereby avoiding additional requests due to changed 'allprop' 5678 semantics. 5680 o Servers are now allowed to reject PROPFIND requests with Depth: 5681 Infinity. Clients that used this will need to be able to do a 5682 series of Depth:1 requests instead. 5684 o Multistatus response bodies now can transport the value of HTTP's 5685 Location response header in the new 'location' element. Clients 5686 may use this to avoid additional roundtrips to the server when 5687 there is a 'response' element with a 3xx status (see 5688 Section 14.24). 5690 o The definition of COPY has been relaxed so that it doesn't require 5691 servers to first delete the target resources anymore (this was a 5692 known incompatibility with [RFC3253]). See Section 9.8. 5694 Headers and Marshalling 5696 o The Destination and If request headers now allow absolute paths in 5697 addition to full URIs (see Section 8.3). This may be useful for 5698 clients operating through a reverse proxy that does rewrite the 5699 Host request header, but not WebDAV-specific headers. 5701 o This specification adopts the error marshalling extensions and the 5702 "precondition/postcondition" terminology defined in [RFC3253] (see 5703 Section 16). Related to that, it adds the "error" XML element 5704 inside multistatus response bodies (see Section 14.5, however note 5705 that it uses a format different from the one recommend in 5706 RFC3253). 5708 o Senders and recipients are now required to support the UTF-16 5709 character encoding in XML message bodies (see Section 19). 5711 o Clients are now required to send the Depth header on PROPFIND 5712 requests, although servers are still encouraged to support clients 5713 that don't. 5715 Locking 5717 o RFC2518's concept of "lock-null resources" (LNRs) has been 5718 replaced by a simplified approach, the "locked empty resources" 5719 (see Section 7.3). There are some aspects of lock-null resources 5720 clients can not rely on anymore, namely the ability to use them to 5721 create a locked collection or the fact that they disappear upon 5722 UNLOCK when no PUT or MKCOL request was issued. Note that servers 5723 are still allowed to implement LNRs as per RFC2518. 5725 o There is no implicit refresh of locks anymore. Locks are only 5726 refreshed upon explicit request (see Section 9.10.2). 5728 o Clarified that the DAV:owner value supplied in the LOCK request 5729 must be preserved by the server just like a dead property 5730 (Section 14.17). Also added the DAV:lockroot element 5731 (Section 14.12) which allows clients to discover the root of lock. 5733 F.2. Changes for Server Implementations 5735 Collections and Namespace Operations 5737 o Due to interoperability problems, allowable formats for contents 5738 of 'href' elements in multistatus responses have been limited (see 5739 Section 8.3). 5741 o Due to lack of implementation, support for the 'propertybehaviour' 5742 request body for COPY and MOVE has been removed. Instead, 5743 requirements for property preservation have been clarified (see 5744 Sections 9.8 and 9.9). 5746 Properties 5748 o Strengthened server requirements for storage of property values, 5749 in particular persistence of language information (xml:lang), 5750 whitespace, and XML namespace information (see Section 4.3). 5752 o Clarified requirements on which properties should be writeable by 5753 the client; in particular, setting "DAV:displayname" should be 5754 supported by servers (see Section 15). 5756 o Only 'rfc1123-date' productions are legal as values for DAV: 5757 getlastmodified (see Section 15.7). 5759 Headers and Marshalling 5761 o Servers are now required to do authorization checks before 5762 processing conditional headers (see Section 8.5). 5764 Locking 5766 o Strengthened requirement to check identity of lock creator when 5767 accessing locked resources (see Section 6.4). Clients should be 5768 aware that lock tokens returned to other principals can only be 5769 used to break a lock, if at all. 5771 o Section 8.10.4 of [RFC2518] incorrectly required servers to return 5772 a 409 status where a 207 status was really appropriate. This has 5773 been corrected (Section 9.10). 5775 F.3. Other Changes 5777 The definition of collection state has been fixed so it doesn't vary 5778 anymore depending on the Request-URI (see Section 5.2). 5780 The DAV:source property introduced in Section 4.6 of [RFC2518] was 5781 removed due to lack of implementation experience. 5783 The DAV header now allows non-IETF extensions through URIs in 5784 addition to compliance class tokens. It also can now be used in 5785 requests, although this specification does not define any associated 5786 semantics for the compliance classes defined in here (see 5787 Section 10.1). 5789 In RFC2518, the definition of the Depth header (Section 9.2) required 5790 that by default request headers would be applied to each resource in 5791 scope. Based on implementation experience, the default has now been 5792 reversed (see Section 10.2). 5794 The definitions of HTTP status code 102 ([RFC2518], Section 10.1) and 5795 the Status-URI response header (Section 9.7) have been removed due to 5796 lack of implementation. 5798 The TimeType format used in the Timeout request header and the 5799 "timeout" XML element used to be extensible. Now, only the two 5800 formats defined by this specification are allowed (see Section 10.7). 5802 Appendix G. Change Log (to be removed by RFC Editor before publication) 5804 G.1. Changes from -05 to -06 5806 Specified that a successful LOCK request to an unmapped URL creates a 5807 new, empty locked resource. 5809 Resolved UNLOCK_NEEDS_IF_HEADER by clarifying that only Lock-Token 5810 header is needed on UNLOCK. 5812 Added Section 16 on preconditions and postconditions and defined a 5813 number of preconditions and postconditions. The 'lock-token- 5814 submitted' precondition resolves the REPORT_OTHER_RESOURCE_LOCKED 5815 issue. 5817 Added example of matching lock token to URI in the case of a 5818 collection lock in the If header section. 5820 Removed ability for Destination header to take "abs_path" in order to 5821 keep consistent with other places where client provides URLs (If 5822 header, href element in request body) 5824 Clarified the href element - that it generally contains HTTP URIs but 5825 not always. 5827 Attempted to fix the BNF describing the If header to allow commas 5829 Clarified presence of Depth header on LOCK refresh requests. 5831 G.2. Changes in -07 5833 Added text to "COPY and the Overwrite Header" section to resolve 5834 issue OVERWRITE_DELETE_ALL_TOO_STRONG. 5836 Added text to "HTTP URL Namespace Model" section to provide more 5837 clarification and examples on what consistency means and what is not 5838 required, to resolve issue CONSISTENCY. 5840 Resolve DEFINE_PRINCIPAL by importing definition of principal from 5841 RFC3744. 5843 Resolve INTEROP_DELETE_AND_MULTISTATUS by adding appendix 3 5844 discussing backward-compatibility concerns. 5846 Resolve DATE_FORMAT_GETLASTMODIFIED by allowing only rfc1123-date, 5847 not HTTP-date for getlastmodified. 5849 Resolve COPY_INTO_YOURSELF_CLARIFY by adding sentence to first para. 5851 of COPY section. 5853 Confirm that WHEN_TO_MULTISTATUS_FOR_DELETE_1 and 5854 WHEN_TO_MULTISTATUS_FOR_DELETE_2 are resolved and tweak language in 5855 DELETE section slightly to be clearly consistent. 5857 More text clarifications to deal with several of the issues in 5858 LOCK_ISSUES. This may not completely resolve that set but we need 5859 feedback from the originator of the issues at this point. 5861 Resolved COPY_INTO_YOURSELF_CLARIFY with new sentence in Copy For 5862 Collections section. 5864 Double checked that LEVEL_OR_CLASS is resolved by using class, not 5865 level. 5867 Further work to resolve IF_AND_AUTH and LOCK_SEMANTICS, clarifying 5868 text on using locks and being authenticated. 5870 Added notes on use of 503 status response to resolve issue 5871 PROPFIND_INFINITY 5873 Removed section on other uses of Metadata (and associated references) 5875 Added reference to RFC4122 for lock tokens and removed section on 5876 generating UUIDs 5878 Explained that even with language variation, a property has only one 5879 value (Section 4.5). 5881 Added section on lock owner (7.1) and what to do if lock requested by 5882 unauthenticated user 5884 Removed Section 4.2 -- justification on why to have metadata, not 5885 needed now 5887 Removed paragraph in Section 5.2 about collections with resource type 5888 "DAV:collection" but which are non-WebDAV compliant -- not 5889 implemented. 5891 G.3. Changes in -08 5893 Added security considerations section on scripts and cookie sessions, 5894 suggested by Barry Lind 5896 Clarified which error codes are defined and undefined in MultiStatus 5898 Moved opaquelocktoken definition to an appendix and refer to RFC4122 5899 for use of 'urn:uuid:' URI scheme; fix all lock token examples to use 5900 this. 5902 Multi-status responses contain URLs which MUST either be absolute 5903 (and begin with the Request-URI or MUST be relative with new 5904 limitations. (bug 12) 5906 Moved status code sections before example sections within PROPFIND 5907 section for section ordering consistency. 5909 Clarified use of Location header with Multi-Status 5911 Bugzilla issue resolutions: bugs 9, 12, 14, 19, 20, 29, 30, 34, 36, 5912 102 and 172. 5914 G.4. Changes in -09 5916 Bugzilla editorial issues: bugs 30, 57, 63, 68, 88, 89, 168, 180, 5917 182, 185, 187. 5919 More clarity between URL namespaces and XML namespaces, particularly 5920 at the beginning of paragraphs using the word namespace 5922 More consistency in referring to properties with the namespace, as in 5923 "DAV:lockdiscovery", and referring to XML element names in single 5924 quotes, e.g. 'allprop' element. 5926 Figure (example) formatting fixes 5928 Bugzilla issues: bugs 24, 37, 39, 43, 45, 27, 25 5930 Replaced references to "non-null state" of resources with more clear 5931 language about URLs that are mapped to resources, bug 25. Also added 5932 definition of URL/URI mapping. Bug 40. 5934 Bugzilla issues: bug 7, 8, 9, 41, 47, 51, 62, 93, 171, 172. Bugs 28 5935 and 94 were iterated on. 5937 Bugzilla issues: 56, 59, 79, 99, 103, 175, 178. Part of bug 23. 5938 Iteration on bug 10. 5940 Iteration on bugs 10, 46 and 47. Bug 11. 5942 Remove "102 Processing" response 5944 Fix bug 46, 105, 107, 120, 140 and 201. 5946 Another stab at bug 12 - relative v. absolute URLs in Multi-Status 5947 response hrefs 5949 Fix bug 6, 11, 15, 16, 28, 32, 42, 51, 52, 53, 58, 60, 62, 186, 189, 5950 191, 199, 200 5952 Fix bug 96 5954 G.5. Changes in -10 5956 Clarify lock intro text on when a client might use another client's 5957 lock token - suggestion by Geoff, Nov 15 5959 Removed Force-Authenticate header and instead added an appendix 5960 explaining how existing mechanisms might resolve the need of clients 5961 to get an authentication challenge (bug 18). 5963 Bug 62, 113, 125, 131, 143, 144, 171, 193 5965 Bug 176, 177, 179, 181, 184, 206, 207, 208 5967 G.6. Changes in -11 5969 Bug 10, 50, 92, 213, 214, 215 5971 not recommend use of 414 for over-long Destination URI, bug 179 5973 Changes for bug 10, 31, 42, 44, 46, 47, 80, 86, 99, 124, 132, 143, 5974 147, 152, 166, 177, 188, 216, 218 5976 Various changes discussed in conference call, including bug 10, 42, 5977 44, 80, 97, 152. 5979 Bugs 55, 85, 86 5981 G.7. Changes in -12 5983 Incorporated GULP (Lock model) into document, making a fair number of 5984 changes to rationalize the new order of explaining things, keeping 5985 text that explains a lock model concept in more detail but removing 5986 text that is redundant or inconsistent. 5988 Various bugs including 46, 48, 53, 97, 152, 179, 184, 188, 200, 210, 5989 211, and 225. Moved URL Handling from Multi-Status section to 5990 general request and response handling section as it now applies to 5991 Destination and If as well as 'href' in Multi-Status. Moved GR&RH 5992 section up one level to be the new Section 8. 5994 Bug 53, 184, 210, 213, 217, 221 5995 Further rewriting of URL Handling section. Changes resulting from 5996 discussion of empty locked resources and how servers should handle 5997 Content-Type in that situation. Bug 48, 179. 5999 Bug 227, 228 6001 G.8. Changes in -13 6003 Moved the timeout model text and clarified it (bug 229). 6005 Fixed the definition of collection state (bug 227). 6007 Made the depth header required on PROPFIND requests (bug 213). 6009 Fixed inconsistencies in Destination header definition (bug 211). 6011 Improved appendix on HTTP client compatibility (bug 100). 6013 Fixed external references with unwieldy pointers (bug 72). 6015 G.9. Changes in -14 6017 Changes section rewritten, if section rewritten 6019 Collection definition and membership requirements changed (bug 227) 6021 Bug 100 and 229 iterations, smallish editorial changes 6023 G.10. Changes in -15 6025 Moved lock-null resource explanation to an appendix. 6027 Reverted to RFC2518 behavior of refreshing lock with "If" header. 6029 Removed section on locks and multiple bindings. 6031 Removed requirement for clients to upate a property only once in a 6032 PROPPATCH. 6034 Updated displayname property description. 6036 Copy-edit level changes e.g. "read-only" to "protected", and defining 6037 what it means to protect a resource with a lock. 6039 G.11. Changes in -16 6041 Fixed factual errors in Security Considerations authentication 6042 section. 6044 Fixed example of refreshing a lock -- didn't use "If" header as 6045 required in the text. 6047 Fixed example of using so-called 'all-prop' with the 'include' 6048 directivenotifi, so that it would actually be a useful example, by 6049 including live properties that wouldn't already be covered by 'all- 6050 prop'. 6052 Clarified requirement in section 7.7 paragraph 2 -- a clear 6053 requirement for the server to meet, rather than passive voice "this 6054 request MUST only be used". 6056 Made explicit requirement for successful response format for 6057 PROPPATCH (bug 238) 6059 Some fixes for bugs 213, 241, 246, 248, 249, 250 -- all editorial 6060 changes. 6062 Tighten requirements in Security Considerations section for 6063 authentication over secure channels. 6065 G.12. Changes in -17 6067 Change reference for PROPFIND MultiStatus response format from 6068 section 15 to section 9.2.1 6070 Add another "except" clause to statement requiring pre/postcondition 6071 codes to appear in 'error' 6073 Remove requirement to use TLS -- back to requiring channel to be 6074 secure. 6076 G.13. Changes in -18 6078 Text clarifications and typo fixes in response to IETF Last Call 6079 comments 6081 Removed suggestive/confusing text about lock notifications 6083 Add section with guidance for clients dealing with both lock-null 6084 resources and locked empty resources. 6086 Allow servers to omit owner information in lockdiscovery property. 6088 Clarify what 'allprop' means, mostly fixing misleading text in change 6089 summary 6091 Author's Address 6093 Lisa Dusseault (editor) 6094 CommerceNet 6095 2064 Edgewood Dr. 6096 Palo Alto, CA 94303 6097 US 6099 Email: ldusseault@commerce.net 6101 Full Copyright Statement 6103 Copyright (C) The IETF Trust (2007). 6105 This document is subject to the rights, licenses and restrictions 6106 contained in BCP 78, and except as set forth therein, the authors 6107 retain all their rights. 6109 This document and the information contained herein are provided on an 6110 "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS 6111 OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND 6112 THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS 6113 OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF 6114 THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED 6115 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 6117 Intellectual Property 6119 The IETF takes no position regarding the validity or scope of any 6120 Intellectual Property Rights or other rights that might be claimed to 6121 pertain to the implementation or use of the technology described in 6122 this document or the extent to which any license under such rights 6123 might or might not be available; nor does it represent that it has 6124 made any independent effort to identify any such rights. Information 6125 on the procedures with respect to rights in RFC documents can be 6126 found in BCP 78 and BCP 79. 6128 Copies of IPR disclosures made to the IETF Secretariat and any 6129 assurances of licenses to be made available, or the result of an 6130 attempt made to obtain a general license or permission for the use of 6131 such proprietary rights by implementers or users of this 6132 specification can be obtained from the IETF on-line IPR repository at 6133 http://www.ietf.org/ipr. 6135 The IETF invites any interested party to bring to its attention any 6136 copyrights, patents or patent applications, or other proprietary 6137 rights that may cover technology that may be required to implement 6138 this standard. Please address the information to the IETF at 6139 ietf-ipr@ietf.org. 6141 Acknowledgment 6143 Funding for the RFC Editor function is provided by the IETF 6144 Administrative Support Activity (IASA).