idnits 2.17.1 draft-ietf-webdav-rfc2518bis-15.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 15. -- Found old boilerplate from RFC 3978, Section 5.5 on line 6040. -- Found old boilerplate from RFC 3979, Section 5, paragraph 1 on line 6017. -- Found old boilerplate from RFC 3979, Section 5, paragraph 2 on line 6024. -- Found old boilerplate from RFC 3979, Section 5, paragraph 3 on line 6030. ** This document has an original RFC 3978 Section 5.4 Copyright Line, instead of the newer IETF Trust Copyright according to RFC 4748. ** This document has an original RFC 3978 Section 5.5 Disclaimer, instead of the newer disclaimer which includes the IETF Trust according to RFC 4748. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- == No 'Intended status' indicated for this document; assuming Proposed Standard 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 RFC 3978 Section 5.4 Copyright Line does not match the current year == Line 572 has weird spacing: '... 492 The value of the property appears inside the property name element. 493 The value may be any kind of well-formed XML content, including both 494 text-only and mixed content. Servers MUST preserve the following XML 495 Information Items (using the terminology from [REC-XML-INFOSET]) in 496 storage and transmission of dead properties: 498 For the property name Element Information Item itself: 500 [namespace name] 502 [local name] 504 [attributes] named "xml:lang" or any such attribute in scope 506 [children] of type element or character 508 On all Element Information Items in the property value: 510 [namespace name] 512 [local name] 514 [attributes] 516 [children] of type element or character 518 On Attribute Information Items in the property value: 520 [namespace name] 522 [local name] 524 [normalized value] 526 On Character Information Items in the property value: 528 [character code] 530 Since prefixes are used in some XML vocabularies (XPath and XML 531 Schema, for example), servers SHOULD preserve, for any Information 532 Item in the value: 534 [prefix] 536 XML Infoset attributes not listed above MAY be preserved by the 537 server, but clients MUST NOT rely on them being preserved. The above 538 rules would also apply by default to live properties, unless defined 539 otherwise. 541 Servers MUST ignore the XML attribute xml:space if present and never 542 use it to change white space handling. White space in property 543 values is significant. 545 4.3.1. Example - Property with Mixed Content 547 Consider a dead property 'author' created by the client as follows: 549 550 551 Jane Doe 552 553 mailto:jane.doe@example.com 555 http://www.example.com 557 558 Jane has been working way too long on the 559 long-awaited revision of ]]>. 560 561 562 564 When this property is requested, a server might return: 566 571 Jane Doe 572 mailto:jane.doe@example.com 574 http://www.example.com 576 577 Jane has been working way too long on the 578 long-awaited revision of <RFC2518>. 579 580 581 583 Note in this example: 585 o The [prefix] for the property name itself was not preserved, being 586 non-significant, all other [prefix] values have been preserved, 588 o attribute values have been rewritten with double quotes instead of 589 single quotes (quoting style is not significant), and attribute 590 order has not been preserved, 592 o the xml:lang attribute has been returned on the property name 593 element itself (it was in scope when the property was set, but the 594 exact position in the response is not considered significant as 595 long as it is in scope), 597 o whitespace between tags has been preserved everywhere (whitespace 598 between attributes not so), 600 o CDATA encapsulation was replaced with character escaping (the 601 reverse would also be legal), 603 o the comment item was stripped (as would have been a processing 604 instruction item). 606 Implementation note: there are cases such as editing scenarios where 607 clients may require that XML content is preserved character-by- 608 character (such as attribute ordering or quoting style). In this 609 case, clients should consider using a text-only property value by 610 escaping all characters that have a special meaning in XML parsing. 612 4.4. Property Names 614 A property name is a universally unique identifier that is associated 615 with a schema that provides information about the syntax and 616 semantics of the property. 618 Because a property's name is universally unique, clients can depend 619 upon consistent behavior for a particular property across multiple 620 resources, on the same and across different servers, so long as that 621 property is "live" on the resources in question, and the 622 implementation of the live property is faithful to its definition. 624 The XML namespace mechanism, which is based on URIs ([RFC3986]), is 625 used to name properties because it prevents namespace collisions and 626 provides for varying degrees of administrative control. 628 The property namespace is flat; that is, no hierarchy of properties 629 is explicitly recognized. Thus, if a property A and a property A/B 630 exist on a resource, there is no recognition of any relationship 631 between the two properties. It is expected that a separate 632 specification will eventually be produced which will address issues 633 relating to hierarchical properties. 635 Finally, it is not possible to define the same property twice on a 636 single resource, as this would cause a collision in the resource's 637 property namespace. 639 4.5. Source Resources and Output Resources 641 Some HTTP resources are dynamically generated by the server. For 642 these resources, there presumably exists source code somewhere 643 governing how that resource is generated. The relationship of source 644 files to output HTTP resources may be one to one, one to many, many 645 to one or many to many. There is no mechanism in HTTP to determine 646 whether a resource is even dynamic, let alone where its source files 647 exist or how to author them. Although this problem would usefully be 648 solved, interoperable WebDAV implementations have been widely 649 deployed without actually solving this problem, by dealing only with 650 static resources. Thus, the source vs. output problem is not solved 651 in this specification and has been deferred to a separate document. 653 5. Collections of Web Resources 655 This section provides a description of a new type of Web resource, 656 the collection, and discusses its interactions with the HTTP URL 657 namespace. The purpose of a collection resource is to model 658 collection-like objects (e.g., file system directories) within a 659 server's namespace. 661 All DAV compliant resources MUST support the HTTP URL namespace model 662 specified herein. 664 5.1. HTTP URL Namespace Model 666 The HTTP URL namespace is a hierarchical namespace where the 667 hierarchy is delimited with the "/" character. 669 An HTTP URL namespace is said to be consistent if it meets the 670 following conditions: for every URL in the HTTP hierarchy there 671 exists a collection that contains that URL as an internal member URL. 672 The root, or top-level collection of the namespace under 673 consideration, is exempt from the previous rule. The top-level 674 collection of the namespace under consideration is not necessarily 675 the collection identified by the absolute path '/', it may be 676 identified by one or more path segments (e.g. /servlets/webdav/...) 678 Neither HTTP/1.1 nor WebDAV require that the entire HTTP URL 679 namespace be consistent -- a WebDAV-compatible resource may not have 680 a parent collection. However, certain WebDAV methods are prohibited 681 from producing results that cause namespace inconsistencies. 683 As is implicit in [RFC2616] and [RFC3986], any resource, including 684 collection resources, MAY be identified by more than one URI. For 685 example, a resource could be identified by multiple HTTP URLs. 687 5.2. Collection Resources 689 Collection resources differ from other resources in that they also 690 act as containers. A collection is a resource whose state consists 691 of at least a set of mappings between path segments and resources, 692 and a set of properties on the collection itself. In this document, 693 a resource B will be said to be contained in the collection resource 694 A if there is a path segment mapping which maps to B and which is 695 contained in A. A collection MUST contain at most one mapping for a 696 given path segment, i.e., it is illegal to have the same path segment 697 mapped to more than one resource. 699 Properties defined on collections behave exactly as do properties on 700 non-collection resources. A collection MAY have additional state 701 such as entity bodies returned by GET. 703 For all WebDAV compliant resources A and B, identified by URLs "U" 704 and "V" respectively, such that "V" is equal to "U/SEGMENT", A MUST 705 be a collection that contains a mapping from "SEGMENT" to B. So, if 706 resource B with URL "http://example.com/bar/blah" is WebDAV compliant 707 and if resource A with URL "http://example.com/bar/" is WebDAV 708 compliant, then resource A must be a collection and must contain 709 exactly one mapping from "blah" to B. 711 Although commonly a mapping consists of a single segment and a 712 resource, in general, a mapping consists of a set of segments and a 713 resource. This allows a server to treat a set of segments as 714 equivalent (i.e. either all of the segments are mapped to the same 715 resource, or none of the segments are mapped to a resource). For 716 example, a server that performs case-folding on segments will treat 717 the segments "ab", "Ab", "aB", and "AB" as equivalent. A client can 718 then use any of these segments to identify the resource. Note that a 719 PROPFIND result will select one of these equivalent segments to 720 identify the mapping, so there will be one PROPFIND response element 721 per mapping, not one per segment in the mapping. 723 Collection resources MAY have mappings to non-WebDAV compliant 724 resources in the HTTP URL namespace hierarchy but are not required to 725 do so. For example, if resource X with URL 726 "http://example.com/bar/blah" is not WebDAV compliant and resource A 727 with "URL http://example.com/bar/" identifies a WebDAV collection, 728 then A may or may not have a mapping from "blah" to X. 730 If a WebDAV compliant resource has no WebDAV compliant internal 731 members in the HTTP URL namespace hierarchy then the WebDAV compliant 732 resource is not required to be a collection. 734 There is a standing convention that when a collection is referred to 735 by its name without a trailing slash, the server MAY handle the 736 request as if the trailing slash were present. In this case it 737 SHOULD return a Content-Location header in the response, pointing to 738 the URL ending with the "/". For example, if a client invokes a 739 method on http://example.com/blah (no trailing slash), the server may 740 respond as if the operation were invoked on http://example.com/blah/ 741 (trailing slash), and should return a Content-Location header with 742 the value http://example.com/blah/. Wherever a server produces a URL 743 referring to a collection, the server SHOULD include the trailing 744 slash. In general clients SHOULD use the trailing slash form of 745 collection names. If clients do not use the trailing slash form the 746 client needs to be prepared to see a redirect response. Clients will 747 find the DAV:resourcetype property more reliable than the URL to find 748 out if a resource is a collection. 750 Clients MUST be able to support the case where WebDAV resources are 751 contained inside non-WebDAV resources. For example, if a OPTIONS 752 response from "http://example.com/servlet/dav/collection" indicates 753 WebDAV support, the client cannot assume that 754 "http://example.com/servlet/dav/" or its parent necessarily are 755 WebDAV collections. 757 A typical scenario in which mapped URLs do not appear as members of 758 their parent collection is the case where a server allows links or 759 redirects to non-WebDAV resources. For instance, "/col/link" might 760 not appear as a member of "/col/", although the server would respond 761 with a 302 status to a GET request to "/col/link", thus the URL 762 "/col/link" would indeed be mapped. Similarly, a dynamically- 763 generated page might have a URL mapping from "/col/index.html", thus 764 this resource might respond with a 200 OK to a GET request yet not 765 appear as a member of "/col/". 767 Some mappings to even WebDAV-compliant resources might not appear in 768 the parent collection. An example for this case are servers that 769 support multiple alias URLs for each WebDAV compliant resource. A 770 server may implement case-insensitive URLs, thus "/col/a" and 771 "/col/A" identify the same resource, yet only either "a" or "A" are 772 reported upon listing the members of "/col". In cases where a server 773 treats a set of segments as equivalent, the server MUST expose only 774 one preferred segment per mapping, consistently chosen, in PROPFIND 775 responses. 777 6. Locking 779 The ability to lock a resource provides a mechanism for serializing 780 access to that resource. Using a lock, an authoring client can 781 provide a reasonable guarantee that another principal will not modify 782 a resource while it is being edited. In this way, a client can 783 prevent the "lost update" problem. 785 This specification allows locks to vary over two client-specified 786 parameters, the number of principals involved (exclusive vs. shared) 787 and the type of access to be granted. This document defines locking 788 for only one access type, write. However, the syntax is extensible, 789 and permits the eventual specification of locking for other access 790 types. 792 6.1. Lock Model 794 This section provides a concise model for how locking behaves. Later 795 sections will provide more detail on some of the concepts and refer 796 back to these model statements. Normative statements related to LOCK 797 and UNLOCK method handling can be found in the sections on those 798 methods, whereas normative statements that cover any method are 799 gathered here. 801 1. A lock either directly or indirectly locks a resource. 803 2. A resource becomes directly locked when a LOCK request to a URL 804 of that resource creates a new lock. The "lock-root" of the new 805 lock is that URL. If at the time of the request, the URL is not 806 mapped to a resource, a new empty resource is created and 807 directly locked. 809 3. An exclusive lock (Section 6.2) conflicts with any other kind of 810 lock on the same resource, whether either lock is direct or 811 indirect. A server MUST NOT create conflicting locks on a 812 resource. 814 4. For a collection that is locked with an infinite depth lock L, 815 all member resources are indirectly locked. Changes in 816 membership of a such a collection affect the set of indirectly 817 locked resources: 819 * If a member resource is added to the collection, the new 820 member resource MUST NOT already have a conflicting lock, 821 because the new resource MUST become indirectly locked by L. 823 * If a member resource stops being a member of the collection, 824 then the resource MUST no longer be indirectly locked by L. 826 5. Each lock is identified by a single unique lock token 827 (Section 6.5). 829 6. An UNLOCK request deletes the lock with the specified lock token. 830 After a lock is deleted, no resource is locked by that lock. 832 7. A lock token is "submitted" in a request when it appears in an If 833 header (the Write Lock (Section 7) section discusses when token 834 submission is required for write locks). 836 8. If a request causes the lock-root of any lock to become an 837 unmapped URL, then the lock MUST also be deleted by that request. 839 6.2. Exclusive Vs. Shared Locks 841 The most basic form of lock is an exclusive lock. Exclusive locks 842 avoid having to deal with content change conflicts, without requiring 843 any coordination other than the methods described in this 844 specification. 846 However, there are times when the goal of a lock is not to exclude 847 others from exercising an access right but rather to provide a 848 mechanism for principals to indicate that they intend to exercise 849 their access rights. Shared locks are provided for this case. A 850 shared lock allows multiple principals to receive a lock. Hence any 851 principal with appropriate access can use the lock. 853 With shared locks there are two trust sets that affect a resource. 854 The first trust set is created by access permissions. Principals who 855 are trusted, for example, may have permission to write to the 856 resource. Among those who have access permission to write to the 857 resource, the set of principals who have taken out a shared lock also 858 must trust each other, creating a (typically) smaller trust set 859 within the access permission write set. 861 Starting with every possible principal on the Internet, in most 862 situations the vast majority of these principals will not have write 863 access to a given resource. Of the small number who do have write 864 access, some principals may decide to guarantee their edits are free 865 from overwrite conflicts by using exclusive write locks. Others may 866 decide they trust their collaborators will not overwrite their work 867 (the potential set of collaborators being the set of principals who 868 have write permission) and use a shared lock, which informs their 869 collaborators that a principal may be working on the resource. 871 The WebDAV extensions to HTTP do not need to provide all of the 872 communications paths necessary for principals to coordinate their 873 activities. When using shared locks, principals may use any out of 874 band communication channel to coordinate their work (e.g., face-to- 875 face interaction, written notes, post-it notes on the screen, 876 telephone conversation, Email, etc.) The intent of a shared lock is 877 to let collaborators know who else may be working on a resource. 879 Shared locks are included because experience from web distributed 880 authoring systems has indicated that exclusive locks are often too 881 rigid. An exclusive lock is used to enforce a particular editing 882 process: take out an exclusive lock, read the resource, perform 883 edits, write the resource, release the lock. This editing process 884 has the problem that locks are not always properly released, for 885 example when a program crashes, or when a lock creator leaves without 886 unlocking a resource. While both timeouts (Section 6.6) and 887 administrative action can be used to remove an offending lock, 888 neither mechanism may be available when needed; the timeout may be 889 long or the administrator may not be available. 891 A successful request for a new shared lock MUST result in the 892 generation of a unique lock associated with the requesting principal. 893 Thus if five principals have taken out shared write locks on the same 894 resource there will be five locks and five lock tokens, one for each 895 principal. 897 6.3. Required Support 899 A WebDAV compliant resource is not required to support locking in any 900 form. If the resource does support locking it may choose to support 901 any combination of exclusive and shared locks for any access types. 903 The reason for this flexibility is that locking policy strikes to the 904 very heart of the resource management and versioning systems employed 905 by various storage repositories. These repositories require control 906 over what sort of locking will be made available. For example, some 907 repositories only support shared write locks while others only 908 provide support for exclusive write locks while yet others use no 909 locking at all. As each system is sufficiently different to merit 910 exclusion of certain locking features, this specification leaves 911 locking as the sole axis of negotiation within WebDAV. 913 6.4. Lock Creator and Privileges 915 The creator of a lock has special privileges to use the lock to 916 modify the resource. When a locked resource is modified, a server 917 MUST check that the authenticated principal matches the lock creator 918 (in addition to checking for valid lock token submission). 920 The server MAY allow privileged users other than the lock creator to 921 destroy a lock (for example, the resource owner or an administrator). 923 The 'unlock' privilege in [RFC3744] was defined to provide that 924 permission. 926 There is no requirement for servers to accept LOCK requests from all 927 users or from anonymous users. 929 Note that having a lock does not confer full privilege to modify the 930 locked resource. Write access and other privileges MUST be enforced 931 through normal privilege or authentication mechanisms, not based on 932 the possible obscurity of lock token values. 934 6.5. Lock Tokens 936 A lock token is a type of state token which identifies a particular 937 lock. Each lock has exactly one unique lock token generated by the 938 server. Clients MUST NOT attempt to interpret lock tokens in any 939 way. 941 Lock token URIs MUST be unique across all resources for all time. 942 This uniqueness constraint allows lock tokens to be submitted across 943 resources and servers without fear of confusion. Since lock tokens 944 are unique, a client MAY submit a lock token in an If header on a 945 resource other than the one that returned it. 947 When a LOCK operation creates a new lock, the new lock token is 948 returned in the Lock-Token response header defined in Section 10.5, 949 and also in the body of the response. 951 Servers MAY make lock tokens publicly readable (e.g. in the DAV: 952 lockdiscovery property). One use case for making lock tokens 953 readable is so that a long-lived lock can be removed by the resource 954 owner (the client that obtained the lock might have crashed or 955 disconnected before cleaning up the lock). Except for the case of 956 using UNLOCK under user guidance, a client SHOULD NOT use a lock 957 token created by another client instance. 959 This specification encourages servers to create UUIDs for lock 960 tokens, and to use the URI form defined by "A Universally Unique 961 Identifier (UUID) URN Namespace" ([RFC4122]). However servers are 962 free to use any URI (e.g. from another scheme) so long as it meets 963 the uniqueness requirements. For example, a valid lock token might 964 be constructed using the "opaquelocktoken" scheme defined in 965 Appendix C. 967 Example: "urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6" 969 6.6. Lock Timeout 971 A lock MAY have a limited lifetime. The lifetime is suggested by the 972 client when creating or refreshing the lock, but the server 973 ultimately chooses the timeout value. Timeout is measured in seconds 974 remaining until lock expiration. 976 The timeout counter MUST be restarted if a refresh lock request is 977 successful (see Section 9.10.2). The timeout counter SHOULD NOT be 978 restarted at any other time. 980 If the timeout expires then the lock SHOULD be removed. In this case 981 the server SHOULD act as if an UNLOCK method was executed by the 982 server on the resource using the lock token of the timed-out lock, 983 performed with its override authority. Thus logs should be updated 984 with the disposition of the lock, notifications should be sent, etc., 985 just as they would be for an UNLOCK request. 987 Servers are advised to pay close attention to the values submitted by 988 clients, as they will be indicative of the type of activity the 989 client intends to perform. For example, an applet running in a 990 browser may need to lock a resource, but because of the instability 991 of the environment within which the applet is running, the applet may 992 be turned off without warning. As a result, the applet is likely to 993 ask for a relatively small timeout value so that if the applet dies, 994 the lock can be quickly harvested. However, a document management 995 system is likely to ask for an extremely long timeout because its 996 user may be planning on going off-line. 998 A client MUST NOT assume that just because the time-out has expired 999 the lock has immediately been removed. 1001 Likewise, a client MUST NOT assume that just because the time-out has 1002 not expired, the lock still exists. Clients MUST assume that locks 1003 can arbitrarily disappear at any time, regardless of the value given 1004 in the Timeout header. The Timeout header only indicates the 1005 behavior of the server if extraordinary circumstances do not occur. 1006 For example, a sufficiently privileged user may remove a lock at any 1007 time or the system may crash in such a way that it loses the record 1008 of the lock's existence. 1010 6.7. Lock Capability Discovery 1012 Since server lock support is optional, a client trying to lock a 1013 resource on a server can either try the lock and hope for the best, 1014 or perform some form of discovery to determine what lock capabilities 1015 the server supports. This is known as lock capability discovery. A 1016 client can determine what lock types the server supports by 1017 retrieving the DAV:supportedlock property. 1019 Any DAV compliant resource that supports the LOCK method MUST support 1020 the DAV:supportedlock property. 1022 6.8. Active Lock Discovery 1024 If another principal locks a resource that a principal wishes to 1025 access, it is useful for the second principal to be able to find out 1026 who the first principal is. For this purpose the DAV:lockdiscovery 1027 property is provided. This property lists all outstanding locks, 1028 describes their type, and MAY even provide the lock tokens. 1030 Any DAV compliant resource that supports the LOCK method MUST support 1031 the DAV:lockdiscovery property. 1033 7. Write Lock 1035 This section describes the semantics specific to the write lock type. 1036 The write lock is a specific instance of a lock type, and is the only 1037 lock type described in this specification. 1039 An exclusive write lock protects a resource: it prevents changes by 1040 any principal other than the lock creator and in any case where the 1041 lock token is not submitted (e.g. by a client process other than the 1042 one holding the lock). 1044 Clients MUST submit a lock-token they are authorized to use in any 1045 request which modifies a write-locked resource. The list of 1046 modifications covered by a write-lock include: 1048 1. A change to any of the following aspects of any write-locked 1049 resource: 1051 * any variant, 1053 * any dead property, 1055 * any live property which is lockable (a live property is 1056 lockable unless otherwise defined.) 1058 2. For collections, any modification of an internal member URI. An 1059 internal member URI of a collection is considered to be modified 1060 if it is added, removed, or identifies a different resource. 1061 More discussion on write locks and collections is found in 1062 Section 7.4. 1064 3. A modification of the mapping of the root of the write lock, 1065 either to another resource or to no resource (e.g. DELETE). 1067 Of the methods defined in HTTP and WebDAV, PUT, POST, PROPPATCH, 1068 LOCK, UNLOCK, MOVE, COPY (for the destination resource), DELETE, and 1069 MKCOL are affected by write locks. All other HTTP/WebDAV methods 1070 defined so far, GET in particular, function independently of a write 1071 lock. 1073 The next few sections describe in more specific terms how write locks 1074 interact with various operations. 1076 7.1. Write Locks and Properties 1078 While those without a write lock may not alter a property on a 1079 resource it is still possible for the values of live properties to 1080 change, even while locked, due to the requirements of their schemas. 1082 Only dead properties and live properties defined as lockable are 1083 guaranteed not to change while write locked. 1085 7.2. Avoiding Lost Updates 1087 Although the write locks provide some help in preventing lost 1088 updates, they cannot guarantee that updates will never be lost. 1089 Consider the following scenario: 1091 Two clients A and B are interested in editing the resource 1092 'index.html'. Client A is an HTTP client rather than a WebDAV 1093 client, and so does not know how to perform locking. 1095 Client A doesn't lock the document, but does a GET and begins 1096 editing. 1098 Client B does LOCK, performs a GET and begins editing. 1100 Client B finishes editing, performs a PUT, then an UNLOCK. 1102 Client A performs a PUT, overwriting and losing all of B's changes. 1104 There are several reasons why the WebDAV protocol itself cannot 1105 prevent this situation. First, it cannot force all clients to use 1106 locking because it must be compatible with HTTP clients that do not 1107 comprehend locking. Second, it cannot require servers to support 1108 locking because of the variety of repository implementations, some of 1109 which rely on reservations and merging rather than on locking. 1110 Finally, being stateless, it cannot enforce a sequence of operations 1111 like LOCK / GET / PUT / UNLOCK. 1113 WebDAV servers that support locking can reduce the likelihood that 1114 clients will accidentally overwrite each other's changes by requiring 1115 clients to lock resources before modifying them. Such servers would 1116 effectively prevent HTTP 1.0 and HTTP 1.1 clients from modifying 1117 resources. 1119 WebDAV clients can be good citizens by using a lock / retrieve / 1120 write /unlock sequence of operations (at least by default) whenever 1121 they interact with a WebDAV server that supports locking. 1123 HTTP 1.1 clients can be good citizens, avoiding overwriting other 1124 clients' changes, by using entity tags in If-Match headers with any 1125 requests that would modify resources. 1127 Information managers may attempt to prevent overwrites by 1128 implementing client-side procedures requiring locking before 1129 modifying WebDAV resources. 1131 7.3. Write Locks and Unmapped URLs 1133 WebDAV provides the ability to send a LOCK request to an unmapped URL 1134 in order to reserve the name for use. This is a simple way to avoid 1135 the lost-update problem on the creation of a new resource (another 1136 way is to use If-None-Match header specified in Section 14.26 of 1137 [RFC2616]). It has the side benefit of locking the new resource 1138 immediately for use of the creator. 1140 Note that the lost-update problem is not an issue for collections 1141 because MKCOL can only be used to create a collection, not to 1142 overwrite an existing collection. When trying to lock a collection 1143 upon creation, clients can attempt to increase the likelihood of 1144 getting the lock by pipelining the MKCOL and LOCK requests together 1145 (but because this doesn't convert two separate operations into one 1146 atomic operation there's no guarantee this will work). 1148 A successful lock request to an unmapped URL MUST result in the 1149 creation of a locked (non-collection) resource with empty content. 1150 Subsequently, a successful PUT request (with the correct lock token) 1151 provides the content for the resource. Note that the LOCK request 1152 has no mechanism for the client to provide Content-Type or Content- 1153 Language, thus the server will use defaults or empty values and rely 1154 on the subsequent PUT request for correct values. 1156 A resource created with a LOCK is empty but otherwise behaves in 1157 every way as a normal resource. It behaves the same way as a 1158 resource created by a PUT request with an empty body (and where a 1159 Content-Type and Content-Language was not specified), followed by a 1160 LOCK request to the same resource. Following from this model, a 1161 locked empty resource: 1163 o Can be read, deleted, moved, copied, and in all ways behave as a 1164 regular non-collection resource. 1166 o Appears as a member of its parent collection. 1168 o SHOULD NOT disappear when its lock goes away (clients must 1169 therefore be responsible for cleaning up their own mess, as with 1170 any other operation or any non-empty resource) 1172 o MAY NOT have values for properties like DAV:getcontentlanguage 1173 which haven't been specified yet by the client. 1175 o Can be updated (have content added) with a PUT request. 1177 o MUST NOT be converted into a collection. The server MUST fail a 1178 MKCOL request (as it would with a MKCOL request to any existing 1179 non-collection resource). 1181 o MUST have defined values for DAV:lockdiscovery and DAV: 1182 supportedlock properties. 1184 o The response MUST indicate that a resource was created, by use of 1185 the "201 Created" response code (a LOCK request to an existing 1186 resource instead will result in 200 OK). The body must still 1187 include the DAV:lockdiscovery property, as with a LOCK request to 1188 an existing resource. 1190 The client is expected to update the locked empty resource shortly 1191 after locking it, using PUT and possibly PROPPATCH. 1193 Alternatively and for backwards compatibility to [RFC2518], servers 1194 MAY implement Lock-Null Resources (LNRs) instead (see definition in 1195 Appendix D). Clients can easily interoperate both with servers that 1196 support the old model LNRs and the recommended model of "locked empty 1197 resources" by only attempting PUT after a LOCK to an unmapped URL, 1198 not MKCOL or GET, and by not relying on specific properties of LNRs. 1200 7.4. Write Locks and Collections 1202 There are two kinds of collection write locks. A "Depth 0" write 1203 lock on a collection protects the collection properties plus the 1204 internal member URLs of that one collection, while not protecting the 1205 content or properties of member resources (if the collection itself 1206 has any entity bodies, those are also protected). A "Depth: 1207 infinity" write lock on a collection provides the same protection on 1208 that collection and also provides write lock protection on every 1209 member resource. 1211 Expressed otherwise, a write lock protects any request that would 1212 create a new resource in a write locked collection, any request that 1213 would remove an internal member URL of a write locked collection, and 1214 any request that would change the segment name of any internal 1215 member. 1217 Thus, a collection write lock protects all the following actions: 1219 o DELETE a collection's direct internal member, 1221 o MOVE an internal member out of the collection, 1223 o MOVE an internal member into the collection, 1225 o MOVE to rename an internal member within a collection, 1226 o COPY an internal member into a collection, and 1228 o PUT or MKCOL request which would create a new internal member. 1230 The collection's lock token is required in addition to the lock token 1231 on the internal member itself, if it is locked separately. 1233 In addition, a depth-infinity lock affects all write operations to 1234 all members of the locked collection. With a depth-infinity lock, 1235 the resource identified by the root of the lock is directly locked, 1236 and all its members are indirectly locked. 1238 o Any new resource added as a descendent of a depth-infinity locked 1239 collection becomes indirectly locked. 1241 o Any indirectly locked resource moved out of the locked collection 1242 into an unlocked collection is thereafter unlocked. 1244 o Any indirectly locked resource moved out of a locked source 1245 collection into a depth-infinity locked target collection remains 1246 indirectly locked but is now protected by the lock on the target 1247 collection (the target collection's lock token will thereafter be 1248 required to make further changes). 1250 If a depth-infinity write LOCK request is issued to a collection 1251 containing member URLs identifying resources that are currently 1252 locked in a manner which conflicts with the new lock (see Section 6.1 1253 point 3), the request MUST fail with a 423 (Locked) status code, and 1254 the response SHOULD contain the 'no-conflicting-lock' precondition. 1256 If a lock request causes the URL of a resource to be added as an 1257 internal member URL of a depth-infinity locked collection then the 1258 new resource MUST be automatically protected by the lock. For 1259 example, if the collection /a/b/ is write locked and the resource /c 1260 is moved to /a/b/c then resource /a/b/c will be added to the write 1261 lock. 1263 7.5. Write Locks and the If Request Header 1265 A user agent has to demonstrate knowledge of a lock when requesting 1266 an operation on a locked resource. Otherwise, the following scenario 1267 might occur. In the scenario, program A, run by User A, takes out a 1268 write lock on a resource. Program B, also run by User A, has no 1269 knowledge of the lock taken out by program A, yet performs a PUT to 1270 the locked resource. In this scenario, the PUT succeeds because 1271 locks are associated with a principal, not a program, and thus 1272 program B, because it is acting with principal A's credential, is 1273 allowed to perform the PUT. However, had program B known about the 1274 lock, it would not have overwritten the resource, preferring instead 1275 to present a dialog box describing the conflict to the user. Due to 1276 this scenario, a mechanism is needed to prevent different programs 1277 from accidentally ignoring locks taken out by other programs with the 1278 same authorization. 1280 In order to prevent these collisions a lock token MUST be submitted 1281 by an authorized principal for all locked resources that a method may 1282 change or the method MUST fail. A lock token is submitted when it 1283 appears in an If header. For example, if a resource is to be moved 1284 and both the source and destination are locked then two lock tokens 1285 must be submitted in the If header, one for the source and the other 1286 for the destination. 1288 7.5.1. Example - Write Lock and COPY 1290 >>Request 1292 COPY /~fielding/index.html HTTP/1.1 1293 Host: www.example.com 1294 Destination: http://www.example.com/users/f/fielding/index.html 1295 If: 1296 () 1298 >>Response 1300 HTTP/1.1 204 No Content 1302 In this example, even though both the source and destination are 1303 locked, only one lock token must be submitted, for the lock on the 1304 destination. This is because the source resource is not modified by 1305 a COPY, and hence unaffected by the write lock. In this example, 1306 user agent authentication has previously occurred via a mechanism 1307 outside the scope of the HTTP protocol, in the underlying transport 1308 layer. 1310 7.5.2. Example - Deleting a member of a locked collection 1312 Consider a collection "/locked" exclusively write-locked with Depth: 1313 Infinity, and an attempt to delete an internal member "/locked/ 1314 member": 1316 >>Request 1318 DELETE /locked/member HTTP/1.1 1319 Host: example.com 1321 >>Response 1323 HTTP/1.1 423 Locked 1324 Content-Type: application/xml; charset="utf-8" 1325 Content-Length: xxxx 1327 1328 1329 1330 /locked/ 1331 1332 1334 Thus the client would need to submit the lock token with the request 1335 to make it succeed. To do that, various forms of the If header (see 1336 Section 10.4) could be used. 1338 "No-Tag-List" format: 1340 If: () 1342 "Tagged-List" format, for "http://example.com/locked/": 1344 If: 1345 () 1347 "Tagged-List" format, for "http://example.com/locked/member": 1349 If: 1350 () 1352 Note that for the purpose of submitting the lock token the actual 1353 form doesn't matter; what's relevant is that the lock token appears 1354 in the If header, and that the If header itself evaluates to true. 1356 7.6. Write Locks and COPY/MOVE 1358 A COPY method invocation MUST NOT duplicate any write locks active on 1359 the source. However, as previously noted, if the COPY copies the 1360 resource into a collection that is locked with "Depth: infinity", 1361 then the resource will be added to the lock. 1363 A successful MOVE request on a write locked resource MUST NOT move 1364 the write lock with the resource. However, if there is an existing 1365 lock at the destination, the server MUST add the moved resource to 1366 the destination lock scope. For example, if the MOVE makes the 1367 resource a child of a collection that is locked with "Depth: 1368 infinity", then the resource will be added to that collection's lock. 1370 Additionally, if a resource locked with "Depth: infinity" is moved to 1371 a destination that is within the scope of the same lock (e.g., within 1372 the URL namespace tree covered by the lock), the moved resource will 1373 again be a added to the lock. In both these examples, as specified 1374 in Section 7.5, an If header must be submitted containing a lock 1375 token for both the source and destination. 1377 7.7. Refreshing Write Locks 1379 A client MUST NOT submit the same write lock request twice. Note 1380 that a client is always aware it is resubmitting the same lock 1381 request because it must include the lock token in the If header in 1382 order to make the request for a resource that is already locked. 1384 However, a client may submit a LOCK request with an If header but 1385 without a body. This form of LOCK MUST only be used to "refresh" a 1386 lock. Meaning, at minimum, that any timers associated with the lock 1387 MUST be re-set. 1389 Clients may submit Timeout headers of arbitrary value with their lock 1390 refresh requests. Servers, as always, may ignore Timeout headers 1391 submitted by the client, and a server MAY refresh a lock with a 1392 timeout period that is different than the previous timeout period 1393 used for the lock, provided it advertises the new value in the LOCK 1394 refresh response. 1396 If an error is received in response to a refresh LOCK request the 1397 client MUST NOT assume that the lock was refreshed. 1399 8. General Request and Response Handling 1401 8.1. Precedence in Error Handling 1403 Servers MUST return authorization errors in preference to other 1404 errors. This avoids leaking information about protected resources 1405 (e.g. a client that finds that a hidden resource exists by seeing a 1406 423 Locked response to an anonymous request to the resource). 1408 8.2. Use of XML 1410 In HTTP/1.1, method parameter information was exclusively encoded in 1411 HTTP headers. Unlike HTTP/1.1, WebDAV encodes method parameter 1412 information either in an XML ([REC-XML]) request entity body, or in 1413 an HTTP header. The use of XML to encode method parameters was 1414 motivated by the ability to add extra XML elements to existing 1415 structures, providing extensibility; and by XML's ability to encode 1416 information in ISO 10646 character sets, providing 1417 internationalization support. 1419 In addition to encoding method parameters, XML is used in WebDAV to 1420 encode the responses from methods, providing the extensibility and 1421 internationalization advantages of XML for method output, as well as 1422 input. 1424 When XML is used for a request or response body, the Content-Type 1425 type SHOULD be application/xml. Implementations MUST accept both 1426 text/xml and application/xml in request and response bodies. Use of 1427 text/xml is deprecated. 1429 All DAV compliant clients and resources MUST use XML parsers that are 1430 compliant with [REC-XML] and [REC-XML-NAMES]. All XML used in either 1431 requests or responses MUST be, at minimum, well formed and use 1432 namespaces correctly. If a server receives XML that is not well- 1433 formed then the server MUST reject the entire request with a 400 (Bad 1434 Request). If a client receives XML that is not well-formed in a 1435 response then the client MUST NOT assume anything about the outcome 1436 of the executed method and SHOULD treat the server as malfunctioning. 1438 Note that processing XML submitted by an untrusted source may cause 1439 risks connected to privacy, security, and service quality (see 1440 Section 20). Servers MAY reject questionable requests (even though 1441 they consist of well-formed XML), for instance with a 400 (Bad 1442 Request) status code and an optional response body explaining the 1443 problem. 1445 8.3. URL Handling 1447 URLs appear in many places in requests and responses. 1448 Interoperability experience with [RFC2518] showed that many clients 1449 parsing Multi-Status responses did not fully implement the full 1450 Reference Resolution defined in Section 5 of [RFC3986]. Thus, 1451 servers in particular need to be careful in handling URLs in 1452 responses, to ensure that clients have enough context to be able to 1453 interpret all the URLs. The rules in this section apply not only to 1454 resource URLs in the 'href' element in Multi-Status responses, but 1455 also to the Destination and If header resource URLs. 1457 The sender has a choice between two approaches: using a relative 1458 reference, which is resolved against the Request-URI, or a full URI. 1459 A server MUST ensure that every 'href' value within a Multi-Status 1460 response uses the same format. 1462 WebDAV only uses one form of relative reference in its extensions, 1463 the absolute path. 1465 Simple-ref = absolute-URI | ( path-absolute [ "?" query ] ) 1467 The absolute-URI, path-absolute and query productions are defined in 1468 Section 4.3, 3.3 and 3.4 of [RFC3986]. 1470 Within Simple-ref productions, senders MUST NOT: 1472 o use dot-segments ("." or ".."), or 1474 o have prefixes that do not match the Request-URI (using the 1475 comparison rules defined in Section 3.2.3 of [RFC2616]). 1477 Identifiers for collections SHOULD end in a '/' character. 1479 8.3.1. Example - Correct URL Handling 1481 Consider the collection http://example.com/sample/ with the internal 1482 member URL http://example.com/sample/a%20test and the PROPFIND 1483 request below: 1485 >>Request: 1487 PROPFIND /sample/ HTTP/1.1 1488 Host: example.com 1489 Depth: 1 1491 In this case, the server should return two 'href' elements containing 1492 either 1493 o 'http://example.com/sample/' and 1494 'http://example.com/sample/a%20test', or 1496 o '/sample/' and '/sample/a%20test' 1498 Note that even though the server may be storing the member resource 1499 internally as 'a test', it has to be percent-encoded when used inside 1500 a URI reference (see Section 2.1 of [RFC3986]). Also note that a 1501 legal URI may still contain characters that need to be escaped within 1502 XML character data, such as the ampersand character. 1504 8.4. Required Bodies in Requests 1506 Some of these new methods do not define bodies. Servers MUST examine 1507 all requests for a body, even when a body was not expected. In cases 1508 where a request body is present but would be ignored by a server, the 1509 server MUST reject the request with 415 (Unsupported Media Type). 1510 This informs the client (which may have been attempting to use an 1511 extension) that the body could not be processed as the client 1512 intended. 1514 8.5. HTTP Headers for use in WebDAV 1516 HTTP defines many headers that can be used in WebDAV requests and 1517 responses. Not all of these are appropriate in all situations and 1518 some interactions may be undefined. Note that HTTP 1.1 requires the 1519 Date header in all responses if possible (see Section 14.18, 1520 [RFC2616]). 1522 The server MUST do authorization checks before checking any HTTP 1523 conditional header. 1525 8.6. ETag 1527 HTTP 1.1 recommends the use of ETags rather than modification dates, 1528 for cache-control, and there are even stronger reasons to prefer 1529 ETags for authoring. Correct use of ETags is even more important in 1530 a distributed authoring environment, because ETags are necessary 1531 along with locks to avoid the lost-update problem. A client might 1532 fail to renew a lock, for example when the lock times out and the 1533 client is accidentally offline or in the middle of a long upload. 1534 When a client fails to renew the lock, it's quite possible the 1535 resource can still be relocked and the user can go on editing, as 1536 long as no changes were made in the meantime. ETags are required for 1537 the client to be able to distinguish this case. Otherwise, the 1538 client is forced to ask the user whether to overwrite the resource on 1539 the server without even being able to tell the user whether it has 1540 changed. Timestamps do not solve this problem nearly as well as 1541 ETags. 1543 Strong ETags are much more useful for authoring use cases than weak 1544 ETags. Semantic equivalence can be a useful concept but that depends 1545 on the document type and the application type, and interoperability 1546 might require some agreement or standard outside the scope of this 1547 specification and HTTP. Note also that weak ETags have certain 1548 restrictions in HTTP, e.g. these cannot be used in If-Match headers. 1550 Note that the meaning of an ETag in a PUT response is not clearly 1551 defined either in this document or in RFC2616 (i.e., whether the ETag 1552 means that the resource is octet-for-octet equivalent to the body of 1553 the PUT request, or whether the server could have made minor changes 1554 in the formatting or content of the document upon storage). This is 1555 an HTTP issue, not purely a WebDAV issue, and is being addressed in 1556 [I-D.draft-whitehead-http-etag]. 1558 Because clients may be forced to prompt users or throw away changed 1559 content if the ETag changes, a WebDAV server SHOULD NOT change the 1560 ETag (or the Last-Modified time) for a resource that has an unchanged 1561 body and location. The ETag represents the state of the body or 1562 contents of the resource. There is no similar way to tell if 1563 properties have changed. 1565 8.7. Including error response bodies 1567 HTTP and WebDAV did not use the bodies of most error responses for 1568 machine-parsable information until DeltaV introduced a mechanism to 1569 include more specific information in the body of an error response 1570 (Section 1.6 of [RFC3253]). The error body mechanism is appropriate 1571 to use with any error response that may take a body but does not 1572 already have a body defined. The mechanism is particularly 1573 appropriate when a status code can mean many things (for example, 400 1574 Bad Request can mean required headers are missing, headers are 1575 incorrectly formatted, or much more). This error body mechanism is 1576 covered in Section 16. 1578 8.8. Impact of Namespace Operations on Cache Validators 1580 Note that the HTTP response headers "Etag" and "Last-Modified" (see 1581 [RFC2616], Sections 14.19 and 14.29) are defined per URL (not per 1582 resource), and are used by clients for caching. Therefore servers 1583 must ensure that executing any operation that affects the URL 1584 namespace (such as COPY, MOVE, DELETE, PUT or MKCOL) does preserve 1585 their semantics, in particular: 1587 o For any given URL, the "Last-Modified" value MUST increment every 1588 time the representation returned upon GET changes (within the 1589 limits of timestamp resolution). 1591 o For any given URL, an "ETag" value MUST NOT be re-used for 1592 different representations returned by GET. 1594 In practice this means that servers 1596 o might have to increment "Last-Modified" timestamps for every 1597 resource inside the destination namespace of a namespace operation 1598 unless it can do so more selectively, and 1600 o similarily, might have to re-assign "ETag" values for these 1601 resources (unless the server allocates entity tags in a way so 1602 that they are unique across the whole URL namespace managed by the 1603 server). 1605 Note that these considerations also apply to specific use cases, such 1606 as using PUT to create a new resource at a URL that has been mapped 1607 before, but has been deleted since then. 1609 Finally, WebDAV properties (such as DAV:getetag and DAV: 1610 getlastmodified) that inherit their semantics from HTTP headers must 1611 behave accordingly. 1613 9. HTTP Methods for Distributed Authoring 1615 9.1. PROPFIND Method 1617 The PROPFIND method retrieves properties defined on the resource 1618 identified by the Request-URI, if the resource does not have any 1619 internal members, or on the resource identified by the Request-URI 1620 and potentially its member resources, if the resource is a collection 1621 that has internal member URLs. All DAV compliant resources MUST 1622 support the PROPFIND method and the propfind XML element 1623 (Section 14.20) along with all XML elements defined for use with that 1624 element. 1626 A client MUST submit a Depth header with a value of "0", "1", or 1627 "infinity" with a PROPFIND request. Servers MUST support "0" and "1" 1628 depth requests on WebDAV-compliant resources and SHOULD support 1629 "infinity" requests. In practice, support for depth infinity 1630 requests MAY be disabled, due to the performance and security 1631 concerns associated with this behavior. Since clients weren't 1632 required to include the Depth header in [RFC2518], servers SHOULD 1633 treat such a request as if a "Depth: infinity" header was included. 1635 A client may submit a 'propfind' XML element in the body of the 1636 request method describing what information is being requested. It is 1637 possible to: 1639 o Request particular property values, by naming the properties 1640 desired within the 'prop' element (the ordering of properties in 1641 here MAY be ignored by server), 1643 o Request property values for those properties defined in this 1644 specification plus dead properties, by using the 'allprop' element 1645 (the 'include' element can be used with 'allprop' to instruct the 1646 server to also include additional live properties that may not 1647 have been returned otherwise), 1649 o Request a list of names of all the properties defined on the 1650 resource, by using the 'propname' element. 1652 A client may choose not to submit a request body. An empty PROPFIND 1653 request body MUST be treated as if it were an 'allprop' request. 1655 Note that 'allprop' does not return values for all live properties. 1656 WebDAV servers increasingly have expensively-calculated or lengthy 1657 properties (see [RFC3253] and [RFC3744]) and do not return all 1658 properties already. Instead, WebDAV clients can use propname 1659 requests to discover what live properties exist, and request named 1660 properties when retrieving values. For a live property defined 1661 elsewhere, that definition can specify whether that live property 1662 would be returned in 'allprop' requests or not. 1664 All servers MUST support returning a response of content type text/ 1665 xml or application/xml that contains a multistatus XML element that 1666 describes the results of the attempts to retrieve the various 1667 properties. 1669 If there is an error retrieving a property then a proper error result 1670 MUST be included in the response. A request to retrieve the value of 1671 a property which does not exist is an error and MUST be noted, if the 1672 response uses a 'multistatus' XML element, with a 'response' XML 1673 element which contains a 404 (Not Found) status value. 1675 Consequently, the 'multistatus' XML element for a collection resource 1676 MUST include a 'response' XML element for each member URL of the 1677 collection, to whatever depth was requested. It SHOULD NOT include 1678 any 'response' elements for resources that are not WebDAV-compliant. 1679 Each 'response' element MUST contain an 'href' element that contains 1680 the URL of the resource on which the properties in the prop XML 1681 element are defined. Results for a PROPFIND on a collection resource 1682 are returned as a flat list whose order of entries is not 1683 significant. Note that a resource may have only one value for a 1684 property of a given name, so the property may only show up once in 1685 PROPFIND responses. 1687 Properties may be subject to access control. In the case of 1688 'allprop' and 'propname' requests, if a principal does not have the 1689 right to know whether a particular property exists then the property 1690 MAY be silently excluded from the response. 1692 Some PROPFIND results MAY be cached, with care as there is no cache 1693 validation mechanism for most properties. This method is both safe 1694 and idempotent (see Section 9.1 of [RFC2616]). 1696 9.1.1. PROPFIND status codes 1698 This section, as with similar sections for other methods, provides 1699 some guidance on error codes and preconditions or postconditions 1700 (defined in Section 16) that might be particularly useful with 1701 PROPFIND. 1703 403 Forbidden - A server MAY reject PROPFIND requests on collections 1704 with depth header of "Infinity", in which case it SHOULD use this 1705 error with the precondition code 'propfind-finite-depth' inside the 1706 error body. 1708 9.1.2. Status Codes for use in 'propstat' Element 1710 In PROPFIND responses, information about individual properties is 1711 returned inside 'propstat' elements (see Section 14.22), each 1712 containing an individual 'status' element containing information 1713 about the properties appearing in it. The list below summarizes the 1714 most common status codes used inside 'propstat', however clients 1715 should be prepared to handle other 2/3/4/5xx series status codes as 1716 well. 1718 200 OK - A property exists and/or its value is successfully returned. 1720 401 Unauthorized - The property cannot be viewed without appropriate 1721 authorization. 1723 403 Forbidden - The property cannot be viewed regardless of 1724 authentication. 1726 404 Not Found - The property does not exist. 1728 9.1.3. Example - Retrieving Named Properties 1730 >>Request 1732 PROPFIND /file HTTP/1.1 1733 Host: www.example.com 1734 Content-type: application/xml; charset="utf-8" 1735 Content-Length: xxxx 1737 1738 1739 1740 1741 1742 1743 1744 1745 1747 >>Response 1749 HTTP/1.1 207 Multi-Status 1750 Content-Type: application/xml; charset="utf-8" 1751 Content-Length: xxxx 1753 1754 1755 1756 http://www.example.com/file 1757 1758 1759 1760 Box type A 1761 1762 1763 J.J. Johnson 1764 1765 1766 HTTP/1.1 200 OK 1767 1768 1769 1770 HTTP/1.1 403 Forbidden 1771 The user does not have access to the 1772 DingALing property. 1773 1774 1775 1776 There has been an access violation error. 1777 1778 1780 In this example, PROPFIND is executed on a non-collection resource 1781 http://www.example.com/file. The propfind XML element specifies the 1782 name of four properties whose values are being requested. In this 1783 case only two properties were returned, since the principal issuing 1784 the request did not have sufficient access rights to see the third 1785 and fourth properties. 1787 9.1.4. Example - Using so-called 'allprop' 1789 >>Request 1791 PROPFIND /mycol/ HTTP/1.1 1792 Host: www.example.com 1793 Depth: 1 1794 Content-Type: application/xml; charset="utf-8" 1795 Content-Length: xxxx 1797 1798 1799 1800 1801 1802 1803 1804 1806 In this example, PROPFIND is executed on the resource 1807 http://www.example.com/mycol/ and its internal member resources. The 1808 client requests the values of all live properties defined in this 1809 specification, plus all dead properties, plus two more live 1810 properties defined in [RFC3253]. The response is not shown. 1812 9.1.5. Example - Using 'propname' to Retrieve all Property Names 1814 >>Request 1816 PROPFIND /container/ HTTP/1.1 1817 Host: www.example.com 1818 Content-Type: application/xml; charset="utf-8" 1819 Content-Length: xxxx 1821 1822 1823 1824 1826 >>Response 1828 HTTP/1.1 207 Multi-Status 1829 Content-Type: application/xml; charset="utf-8" 1830 Content-Length: xxxx 1832 1833 1834 1835 http://www.example.com/container/ 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 HTTP/1.1 200 OK 1846 1847 1848 1849 http://www.example.com/container/front.html 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 HTTP/1.1 200 OK 1863 1864 1865 1867 In this example, PROPFIND is invoked on the collection resource 1868 http://www.example.com/container/, with a propfind XML element 1869 containing the propname XML element, meaning the name of all 1870 properties should be returned. Since no Depth header is present, it 1871 assumes its default value of "infinity", meaning the name of the 1872 properties on the collection and all its descendents should be 1873 returned. 1875 Consistent with the previous example, resource 1876 http://www.example.com/container/ has six properties defined on it: 1877 bigbox and author in the "http://ns.example.com/boxschema/" 1878 namespace, and creationdate, displayname, resourcetype, and 1879 supportedlock in the "DAV:" namespace. 1881 The resource http://www.example.com/container/index.html, a member of 1882 the "container" collection, has nine properties defined on it, bigbox 1883 in the "http://ns.example.com/boxschema/" namespace and, 1884 creationdate, displayname, getcontentlength, getcontenttype, getetag, 1885 getlastmodified, resourcetype, and supportedlock in the "DAV:" 1886 namespace. 1888 This example also demonstrates the use of XML namespace scoping and 1889 the default namespace. Since the "xmlns" attribute does not contain 1890 a prefix, the namespace applies by default to all enclosed elements. 1891 Hence, all elements which do not explicitly state the namespace to 1892 which they belong are members of the "DAV:" namespace. 1894 9.1.6. Example - Using 'allprop' 1896 Note that 'allprop', despite its name which remains for backward- 1897 compatibility, does not return every property, but only dead 1898 properties and the live properties defined in this specification. 1900 >>Request 1902 PROPFIND /container/ HTTP/1.1 1903 Host: www.example.com 1904 Depth: 1 1905 Content-Type: application/xml; charset="utf-8" 1906 Content-Length: xxxx 1908 1909 1910 1911 1913 >>Response 1915 HTTP/1.1 207 Multi-Status 1916 Content-Type: application/xml; charset="utf-8" 1917 Content-Length: xxxx 1919 1920 1921 1922 /container/ 1923 1924 1925 Box type A 1926 Hadrian 1927 1997-12-01T17:42:21-08:00 1928 Example collection 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 HTTP/1.1 200 OK 1942 1943 1944 1945 /container/front.html 1946 1947 1948 Box type B 1949 1950 1997-12-01T18:27:21-08:00 1951 Example HTML resource 1952 4525 1953 text/html 1954 "zzyzx" 1955 Mon, 12 Jan 1998 09:25:56 GMT 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 HTTP/1.1 200 OK 1971 1972 1973 1975 In this example, PROPFIND was invoked on the resource 1976 http://www.example.com/container/ with a Depth header of 1, meaning 1977 the request applies to the resource and its children, and a propfind 1978 XML element containing the allprop XML element, meaning the request 1979 should return the name and value of all the dead properties defined 1980 on the resources, plus the name and value of all the properties 1981 defined in this specification. This example illustrates the use of 1982 relative references in the 'href' elements of the response. 1984 The resource http://www.example.com/container/ has six properties 1985 defined on it: 'bigbox' and 'author in the 1986 "http://ns.example.com/boxschema/" namespace, DAV:creationdate, DAV: 1987 displayname, DAV:resourcetype, and DAV:supportedlock. 1989 The last four properties are WebDAV-specific, defined in Section 15. 1990 Since GET is not supported on this resource, the get* properties 1991 (e.g., DAV:getcontentlength) are not defined on this resource. The 1992 WebDAV-specific properties assert that "container" was created on 1993 December 1, 1997, at 5:42:21PM, in a time zone 8 hours west of GMT 1994 (DAV:creationdate), has a name of "Example collection" (DAV: 1995 displayname), a collection resource type (DAV:resourcetype), and 1996 supports exclusive write and shared write locks (DAV:supportedlock). 1998 The resource http://www.example.com/container/front.html has nine 1999 properties defined on it: 2001 'bigbox' in the "http://ns.example.com/boxschema/" namespace (another 2002 instance of the "bigbox" property type), DAV:creationdate, DAV: 2003 displayname, DAV:getcontentlength, DAV:getcontenttype, DAV:getetag, 2004 DAV:getlastmodified, DAV:resourcetype, and DAV:supportedlock. 2006 The DAV-specific properties assert that "front.html" was created on 2007 December 1, 1997, at 6:27:21PM, in a time zone 8 hours west of GMT 2008 (DAV:creationdate), has a name of "Example HTML resource" (DAV: 2009 displayname), a content length of 4525 bytes (DAV:getcontentlength), 2010 a MIME type of "text/html" (DAV:getcontenttype), an entity tag of 2011 "zzyzx" (DAV:getetag), was last modified on Monday, January 12, 1998, 2012 at 09:25:56 GMT (DAV:getlastmodified), has an empty resource type, 2013 meaning that it is not a collection (DAV:resourcetype), and supports 2014 both exclusive write and shared write locks (DAV:supportedlock). 2016 9.2. PROPPATCH Method 2018 The PROPPATCH method processes instructions specified in the request 2019 body to set and/or remove properties defined on the resource 2020 identified by the Request-URI. 2022 All DAV compliant resources MUST support the PROPPATCH method and 2023 MUST process instructions that are specified using the 2024 propertyupdate, set, and remove XML elements. Execution of the 2025 directives in this method is, of course, subject to access control 2026 constraints. DAV compliant resources SHOULD support the setting of 2027 arbitrary dead properties. 2029 The request message body of a PROPPATCH method MUST contain the 2030 propertyupdate XML element. 2032 Servers MUST process PROPPATCH instructions in document order (an 2033 exception to the normal rule that ordering is irrelevant). 2034 Instructions MUST either all be executed or none executed. Thus if 2035 any error occurs during processing all executed instructions MUST be 2036 undone and a proper error result returned. Instruction processing 2037 details can be found in the definition of the set and remove 2038 instructions in Section 14.23 and Section 14.26. 2040 This method is idempotent, but not safe (see Section 9.1 of 2041 [RFC2616]). Responses to this method MUST NOT be cached. 2043 9.2.1. Status Codes for use in 'propstat' Element 2045 In PROPPATCH responses, information about individual properties is 2046 returned inside 'propstat' elements (see Section 14.22), each 2047 containing an individual 'status' element containing information 2048 about the properties appearing in it. The list below summarizes the 2049 most common status codes used inside 'propstat', however clients 2050 should be prepared to handle other 2/3/4/5xx series status codes as 2051 well. 2053 200 (OK) - The property set or change succeeded. Note that if this 2054 appears for one property, it appears for every property in the 2055 response, due to the atomicity of PROPPATCH. 2057 403 (Forbidden) - The client, for reasons the server chooses not to 2058 specify, cannot alter one of the properties. 2060 403 (Forbidden): The client has attempted to set a protected 2061 property, such as DAV:getetag. If returning this error, the server 2062 SHOULD use the precondition code 'cannot-modify-protected-property' 2063 inside the response body. 2065 409 (Conflict) - The client has provided a value whose semantics are 2066 not appropriate for the property. 2068 424 (Failed Dependency) - The property change could not be made 2069 because of another property change that failed. 2071 507 (Insufficient Storage) - The server did not have sufficient space 2072 to record the property. 2074 9.2.2. Example - PROPPATCH 2076 >>Request 2078 PROPPATCH /bar.html HTTP/1.1 2079 Host: www.example.com 2080 Content-Type: application/xml; charset="utf-8" 2081 Content-Length: xxxx 2083 2084 2086 2087 2088 2089 Jim Whitehead 2090 Roy Fielding 2091 2092 2093 2094 2095 2096 2097 2099 >>Response 2101 HTTP/1.1 207 Multi-Status 2102 Content-Type: application/xml; charset="utf-8" 2103 Content-Length: xxxx 2105 2106 2108 2109 http://www.example.com/bar.html 2110 2111 2112 HTTP/1.1 424 Failed Dependency 2113 2114 2115 2116 HTTP/1.1 409 Conflict 2117 2118 Copyright Owner can not be deleted or 2119 altered. 2120 2121 2123 In this example, the client requests the server to set the value of 2124 the "Authors" property in the 2125 "http://ns.example.com/standards/z39.50/" namespace, and to remove 2126 the property "Copyright-Owner" in the same namespace. Since the 2127 Copyright-Owner property could not be removed, no property 2128 modifications occur. The 424 (Failed Dependency) status code for the 2129 Authors property indicates this action would have succeeded if it 2130 were not for the conflict with removing the Copyright-Owner property. 2132 9.3. MKCOL Method 2134 The MKCOL method is used to create a new collection. All WebDAV 2135 compliant resources MUST support the MKCOL method. 2137 MKCOL creates a new collection resource at the location specified by 2138 the Request-URI. If the Request-URI is already mapped to a resource 2139 then the MKCOL MUST fail. During MKCOL processing, a server MUST 2140 make the Request-URI an internal member of its parent collection, 2141 unless the Request-URI is "/". If no such ancestor exists, the 2142 method MUST fail. When the MKCOL operation creates a new collection 2143 resource, all ancestors MUST already exist, or the method MUST fail 2144 with a 409 (Conflict) status code. For example, if a request to 2145 create collection /a/b/c/d/ is made, and /a/b/c/ does not exist, the 2146 request must fail. 2148 When MKCOL is invoked without a request body, the newly created 2149 collection SHOULD have no members. 2151 A MKCOL request message may contain a message body. The precise 2152 behavior of a MKCOL request when the body is present is undefined, 2153 but limited to creating collections, members of a collection, bodies 2154 of members and properties on the collections or members. If the 2155 server receives a MKCOL request entity type it does not support or 2156 understand it MUST respond with a 415 (Unsupported Media Type) status 2157 code. If the server decides to reject the request based on the 2158 presence of an entity or the type of an entity, it should use the 415 2159 (Unsupported Media Type) status code. 2161 This method is idempotent, but not safe (see Section 9.1 of 2162 [RFC2616]). Responses to this method MUST NOT be cached. 2164 9.3.1. MKCOL Status Codes 2166 In addition to the general status codes possible, the following 2167 status codes have specific applicability to MKCOL: 2169 201 (Created) - The collection was created. 2171 403 (Forbidden) - This indicates at least one of two conditions: 1) 2172 the server does not allow the creation of collections at the given 2173 location in its URL namespace, or 2) the parent collection of the 2174 Request-URI exists but cannot accept members. 2176 405 (Method Not Allowed) - MKCOL can only be executed on an unmapped 2177 URL. 2179 409 (Conflict) - A collection cannot be made at the Request-URI until 2180 one or more intermediate collections have been created. The server 2181 MUST NOT create those intermediate collections automatically. 2183 415 (Unsupported Media Type) - The server does not support the 2184 request body type (since this specification does not define any body 2185 for MKCOL requests). 2187 507 (Insufficient Storage) - The resource does not have sufficient 2188 space to record the state of the resource after the execution of this 2189 method. 2191 9.3.2. Example - MKCOL 2193 This example creates a collection called /webdisc/xfiles/ on the 2194 server www.example.com. 2196 >>Request 2198 MKCOL /webdisc/xfiles/ HTTP/1.1 2199 Host: www.example.com 2201 >>Response 2203 HTTP/1.1 201 Created 2205 9.4. GET, HEAD for Collections 2207 The semantics of GET are unchanged when applied to a collection, 2208 since GET is defined as, "retrieve whatever information (in the form 2209 of an entity) is identified by the Request-URI" [RFC2616]. GET when 2210 applied to a collection may return the contents of an "index.html" 2211 resource, a human-readable view of the contents of the collection, or 2212 something else altogether. Hence it is possible that the result of a 2213 GET on a collection will bear no correlation to the membership of the 2214 collection. 2216 Similarly, since the definition of HEAD is a GET without a response 2217 message body, the semantics of HEAD are unmodified when applied to 2218 collection resources. 2220 9.5. POST for Collections 2222 Since by definition the actual function performed by POST is 2223 determined by the server and often depends on the particular 2224 resource, the behavior of POST when applied to collections cannot be 2225 meaningfully modified because it is largely undefined. Thus the 2226 semantics of POST are unmodified when applied to a collection. 2228 9.6. DELETE Requirements 2230 DELETE is defined in [RFC2616], Section 9.7, to "delete the resource 2231 identified by the Request-URI". However, WebDAV changes some DELETE 2232 handling requirements. 2234 A server processing a successful DELETE request: 2236 MUST destroy locks rooted on the deleted resource 2238 MUST remove the mapping from the Request-URI to any resource. 2240 Thus, after a successful DELETE operation (and in the absence of 2241 other actions) a subsequent GET/HEAD/PROPFIND request to the target 2242 Request-URI MUST return 404 (Not Found). 2244 9.6.1. DELETE for Collections 2246 The DELETE method on a collection MUST act as if a "Depth: infinity" 2247 header was used on it. A client MUST NOT submit a Depth header with 2248 a DELETE on a collection with any value but infinity. 2250 DELETE instructs that the collection specified in the Request-URI and 2251 all resources identified by its internal member URLs are to be 2252 deleted. 2254 If any resource identified by a member URL cannot be deleted then all 2255 of the member's ancestors MUST NOT be deleted, so as to maintain URL 2256 namespace consistency. 2258 Any headers included with DELETE MUST be applied in processing every 2259 resource to be deleted. 2261 When the DELETE method has completed processing it MUST result in a 2262 consistent URL namespace. 2264 If an error occurs deleting a member resource (a resource other than 2265 the resource identified in the Request-URI) then the response can be 2266 a 207 (Multi-Status). Multi-Status is used here to indicate which 2267 internal resources could NOT be deleted, including an error code 2268 which should help the client understand which resources caused the 2269 failure. For example, the Multi-Status body could include a response 2270 with status 423 (Locked) if an internal resource was locked. 2272 The server MAY return a 4xx status response, rather than a 207, if 2273 the request failed completely. 2275 424 (Failed Dependency) status codes SHOULD NOT be in the 207 (Multi- 2276 Status) response for DELETE. They can be safely left out because the 2277 client will know that the ancestors of a resource could not be 2278 deleted when the client receives an error for the ancestor's progeny. 2279 Additionally 204 (No Content) errors SHOULD NOT be returned in the 2280 207 (Multi-Status). The reason for this prohibition is that 204 (No 2281 Content) is the default success code. 2283 9.6.2. Example - DELETE 2285 >>Request 2287 DELETE /container/ HTTP/1.1 2288 Host: www.example.com 2290 >>Response 2292 HTTP/1.1 207 Multi-Status 2293 Content-Type: application/xml; charset="utf-8" 2294 Content-Length: xxxx 2296 2297 2298 2299 http://www.example.com/container/resource3 2300 HTTP/1.1 423 Locked 2301 2302 2303 2305 In this example the attempt to delete 2306 http://www.example.com/container/resource3 failed because it is 2307 locked, and no lock token was submitted with the request. 2308 Consequently, the attempt to delete http://www.example.com/container/ 2309 also failed. Thus the client knows that the attempt to delete 2310 http://www.example.com/container/ must have also failed since the 2311 parent can not be deleted unless its child has also been deleted. 2312 Even though a Depth header has not been included, a depth of infinity 2313 is assumed because the method is on a collection. 2315 9.7. PUT Requirements 2317 9.7.1. PUT for Non-Collection Resources 2319 A PUT performed on an existing resource replaces the GET response 2320 entity of the resource. Properties defined on the resource may be 2321 recomputed during PUT processing but are not otherwise affected. For 2322 example, if a server recognizes the content type of the request body, 2323 it may be able to automatically extract information that could be 2324 profitably exposed as properties. 2326 A PUT that would result in the creation of a resource without an 2327 appropriately scoped parent collection MUST fail with a 409 2328 (Conflict). 2330 A PUT request is the only way a client has to indicate to the server 2331 what Content-Type a resource should have, and whether it should 2332 change if the resource is overwritten. Thus, a client SHOULD provide 2333 a Content-Type for a new resource if any is known. If the client 2334 does not provide a Content-Type for a new resource, the server MAY 2335 create a resource with no Content-Type assigned, or it MAY attempt to 2336 assign a Content-Type. 2338 Note that although a recipient should treat metadata supplied with an 2339 HTTP request as authorative, in practice there's no guarantee that a 2340 server will accept Content- headers. Many servers do not allow 2341 configuring the Content-Type on a per-resource basis in the first 2342 place. Thus, clients should not rely on the ability to directly 2343 influence the content type by including a Content-Type request 2344 header. 2346 9.7.2. PUT for Collections 2348 This specification does not define the behavior of the PUT method for 2349 existing collections. A PUT request to an existing collection MAY be 2350 treated as an error (405 Method Not Allowed). 2352 The MKCOL method is defined to create collections. 2354 9.8. COPY Method 2356 The COPY method creates a duplicate of the source resource identified 2357 by the Request-URI, in the destination resource identified by the URI 2358 in the Destination header. The Destination header MUST be present. 2359 The exact behavior of the COPY method depends on the type of the 2360 source resource. 2362 All WebDAV compliant resources MUST support the COPY method. 2363 However, support for the COPY method does not guarantee the ability 2364 to copy a resource. For example, separate programs may control 2365 resources on the same server. As a result, it may not be possible to 2366 copy a resource to a location that appears to be on the same server. 2368 This method is idempotent, but not safe (see Section 9.1 of 2369 [RFC2616]). Responses to this method MUST NOT be cached. 2371 9.8.1. COPY for Non-collection Resources 2373 When the source resource is not a collection the result of the COPY 2374 method is the creation of a new resource at the destination whose 2375 state and behavior match that of the source resource as closely as 2376 possible. Since the environment at the destination may be different 2377 than at the source due to factors outside the scope of control of the 2378 server, such as the absence of resources required for correct 2379 operation, it may not be possible to completely duplicate the 2380 behavior of the resource at the destination. Subsequent alterations 2381 to the destination resource will not modify the source resource. 2382 Subsequent alterations to the source resource will not modify the 2383 destination resource. 2385 9.8.2. COPY for Properties 2387 After a successful COPY invocation, all dead properties on the source 2388 resource SHOULD be duplicated on the destination resource. Live 2389 properties described in this document SHOULD be duplicated as 2390 identically behaving live properties at the destination resource, but 2391 not necessarily with the same values. Servers SHOULD NOT convert 2392 live properties into dead properties on the destination resource, 2393 because clients may then draw incorrect conclusions about the state 2394 or functionality of a resource. Note that some live properties are 2395 defined such that the absence of the property has a specific meaning 2396 (e.g. a flag with one meaning if present and the opposite if absent), 2397 and in these cases, a successful COPY might result in the property 2398 being reported as "Not Found" in subsequent requests. 2400 When the destination is an unmapped URL, a COPY operation creates a 2401 new resource much like a PUT operation does. Live properties which 2402 are related to resource creation (such as DAV:creationdate) should 2403 have their values set accordingly. 2405 9.8.3. COPY for Collections 2407 The COPY method on a collection without a Depth header MUST act as if 2408 a Depth header with value "infinity" was included. A client may 2409 submit a Depth header on a COPY on a collection with a value of "0" 2410 or "infinity". Servers MUST support the "0" and "infinity" Depth 2411 header behaviors on WebDAV-compliant resources. 2413 A COPY of depth infinity instructs that the collection resource 2414 identified by the Request-URI is to be copied to the location 2415 identified by the URI in the Destination header, and all its internal 2416 member resources are to be copied to a location relative to it, 2417 recursively through all levels of the collection hierarchy. Note 2418 that a depth infinity COPY of /A/ into /A/B/ could lead to infinite 2419 recursion if not handled correctly. 2421 A COPY of "Depth: 0" only instructs that the collection and its 2422 properties but not resources identified by its internal member URLs, 2423 are to be copied. 2425 Any headers included with a COPY MUST be applied in processing every 2426 resource to be copied with the exception of the Destination header. 2428 The Destination header only specifies the destination URI for the 2429 Request-URI. When applied to members of the collection identified by 2430 the Request-URI the value of Destination is to be modified to reflect 2431 the current location in the hierarchy. So, if the Request-URI is /a/ 2432 with Host header value http://example.com/ and the Destination is 2433 http://example.com/b/ then when http://example.com/a/c/d is processed 2434 it must use a Destination of http://example.com/b/c/d. 2436 When the COPY method has completed processing it MUST have created a 2437 consistent URL namespace at the destination (see Section 5.1 for the 2438 definition of namespace consistency). However, if an error occurs 2439 while copying an internal collection, the server MUST NOT copy any 2440 resources identified by members of this collection (i.e., the server 2441 must skip this subtree), as this would create an inconsistent 2442 namespace. After detecting an error, the COPY operation SHOULD try 2443 to finish as much of the original copy operation as possible (i.e., 2444 the server should still attempt to copy other subtrees and their 2445 members, that are not descendents of an error-causing collection). 2447 So, for example, if an infinite depth copy operation is performed on 2448 collection /a/, which contains collections /a/b/ and /a/c/, and an 2449 error occurs copying /a/b/, an attempt should still be made to copy 2450 /a/c/. Similarly, after encountering an error copying a non- 2451 collection resource as part of an infinite depth copy, the server 2452 SHOULD try to finish as much of the original copy operation as 2453 possible. 2455 If an error in executing the COPY method occurs with a resource other 2456 than the resource identified in the Request-URI then the response 2457 MUST be a 207 (Multi-Status), and the URL of the resource causing the 2458 failure MUST appear with the specific error. 2460 The 424 (Failed Dependency) status code SHOULD NOT be returned in the 2461 207 (Multi-Status) response from a COPY method. These responses can 2462 be safely omitted because the client will know that the progeny of a 2463 resource could not be copied when the client receives an error for 2464 the parent. Additionally 201 (Created)/204 (No Content) status codes 2465 SHOULD NOT be returned as values in 207 (Multi-Status) responses from 2466 COPY methods. They, too, can be safely omitted because they are the 2467 default success codes. 2469 9.8.4. COPY and Overwriting Destination Resources 2471 If a COPY request has an Overwrite header with a value of "F", and a 2472 resource exists at the Destination URL, the server MUST fail the 2473 request. 2475 When a server executes a COPY request and overwrites a destination 2476 resource, the exact behavior MAY depend on many factors, including 2477 WebDAV extension capabilities (see particularly [RFC3253]). For 2478 example, when an ordinary resource is overwritten, the server could 2479 delete the target resource before doing the copy, or could do an in- 2480 place overwrite to preserve live properties. 2482 When a collection is overwritten, the membership of the destination 2483 collection after the successful COPY request MUST be the same 2484 membership as the source collection immediately before the COPY. 2485 Thus, merging the membership of the source and destination 2486 collections together in the destination is not a compliant behavior. 2488 In general, if clients require the state of the destination URL to be 2489 wiped out prior to a COPY (e.g. to force live properties to be 2490 reset), then the client could send a DELETE to the destination before 2491 the COPY request to ensure this reset. 2493 9.8.5. Status Codes 2495 In addition to the general status codes possible, the following 2496 status codes have specific applicability to COPY: 2498 201 (Created) - The source resource was successfully copied. The 2499 COPY operation resulted in the creation of a new resource. 2501 204 (No Content) - The source resource was successfully copied to a 2502 pre-existing destination resource. 2504 207 (Multi-Status) - Multiple resources were to be affected by the 2505 COPY, but errors on some of them prevented the operation from taking 2506 place. Specific error messages, together with the most appropriate 2507 of the source and destination URLs, appear in the body of the multi- 2508 status response. E.g. if a destination resource was locked and could 2509 not be overwritten, then the destination resource URL appears with 2510 the 423 (Locked) status. 2512 403 (Forbidden) - The operation is forbidden. A special case for 2513 COPY could be that the source and destination resources are the same 2514 resource. 2516 409 (Conflict) - A resource cannot be created at the destination 2517 until one or more intermediate collections have been created. The 2518 server MUST NOT create those intermediate collections automatically. 2520 412 (Precondition Failed) - A precondition header check failed, e.g. 2521 the Overwrite header is "F" and the destination URL is already mapped 2522 to a resource. 2524 423 (Locked) - The destination resource, or resource within the 2525 destination collection, was locked. This response SHOULD contain the 2526 'lock-token-submitted' precondition element. 2528 502 (Bad Gateway) - This may occur when the destination is on another 2529 server, repository or URL namespace. Either the source namespace 2530 does not support copying to the destination namespace, or the 2531 destination namespace refuses to accept the resource. The client may 2532 wish to try GET/PUT and PROPFIND/PROPPATCH instead. 2534 507 (Insufficient Storage) - The destination resource does not have 2535 sufficient space to record the state of the resource after the 2536 execution of this method. 2538 9.8.6. Example - COPY with Overwrite 2540 This example shows resource 2541 http://www.example.com/~fielding/index.html being copied to the 2542 location http://www.example.com/users/f/fielding/index.html. The 204 2543 (No Content) status code indicates the existing resource at the 2544 destination was overwritten. 2546 >>Request 2548 COPY /~fielding/index.html HTTP/1.1 2549 Host: www.example.com 2550 Destination: http://www.example.com/users/f/fielding/index.html 2552 >>Response 2554 HTTP/1.1 204 No Content 2556 9.8.7. Example - COPY with No Overwrite 2558 The following example shows the same copy operation being performed, 2559 but with the Overwrite header set to "F." A response of 412 2560 (Precondition Failed) is returned because the destination URL is 2561 already mapped to a resource. 2563 >>Request 2565 COPY /~fielding/index.html HTTP/1.1 2566 Host: www.example.com 2567 Destination: http://www.example.com/users/f/fielding/index.html 2568 Overwrite: F 2570 >>Response 2572 HTTP/1.1 412 Precondition Failed 2574 9.8.8. Example - COPY of a Collection 2576 >>Request 2578 COPY /container/ HTTP/1.1 2579 Host: www.example.com 2580 Destination: http://www.example.com/othercontainer/ 2581 Depth: infinity 2583 >>Response 2585 HTTP/1.1 207 Multi-Status 2586 Content-Type: application/xml; charset="utf-8" 2587 Content-Length: xxxx 2589 2591 2592 2593 http://www.example.com/othercontainer/R2/ 2594 HTTP/1.1 423 Locked 2595 2596 2597 2599 The Depth header is unnecessary as the default behavior of COPY on a 2600 collection is to act as if a "Depth: infinity" header had been 2601 submitted. In this example most of the resources, along with the 2602 collection, were copied successfully. However the collection R2 2603 failed because the destination R2 is locked. Because there was an 2604 error copying R2, none of R2's members were copied. However no 2605 errors were listed for those members due to the error minimization 2606 rules. 2608 9.9. MOVE Method 2610 The MOVE operation on a non-collection resource is the logical 2611 equivalent of a copy (COPY), followed by consistency maintenance 2612 processing, followed by a delete of the source, where all three 2613 actions are performed in a single operation. The consistency 2614 maintenance step allows the server to perform updates caused by the 2615 move, such as updating all URLs other than the Request-URI which 2616 identify the source resource, to point to the new destination 2617 resource. 2619 The Destination header MUST be present on all MOVE methods and MUST 2620 follow all COPY requirements for the COPY part of the MOVE method. 2621 All WebDAV compliant resources MUST support the MOVE method. 2623 Support for the MOVE method does not guarantee the ability to move a 2624 resource to a particular destination. For example, separate programs 2625 may actually control different sets of resources on the same server. 2626 Therefore, it may not be possible to move a resource within a 2627 namespace that appears to belong to the same server. 2629 If a resource exists at the destination, the destination resource 2630 will be deleted as a side-effect of the MOVE operation, subject to 2631 the restrictions of the Overwrite header. 2633 This method is idempotent, but not safe (see Section 9.1 of 2634 [RFC2616]). Responses to this method MUST NOT be cached. 2636 9.9.1. MOVE for Properties 2638 Live properties described in this document SHOULD be moved along with 2639 the resource, such that the resource has identically behaving live 2640 properties at the destination resource, but not necessarily with the 2641 same values. Note that some live properties are defined such that 2642 the absence of the property has a specific meaning (e.g. a flag with 2643 one meaning if present and the opposite if absent), and in these 2644 cases, a successful MOVE might result in the property being reported 2645 as "Not Found" in subsequent requests. If the live properties will 2646 not work the same way at the destination, the server MAY fail the 2647 request. 2649 MOVE is frequently used by clients to rename a file without changing 2650 its parent collection, so it's not appropriate to reset all live 2651 properties which are set at resource creation. For example, the DAV: 2652 creationdate property value SHOULD remain the same after a MOVE. 2654 Dead properties MUST be moved along with the resource. 2656 9.9.2. MOVE for Collections 2658 A MOVE with "Depth: infinity" instructs that the collection 2659 identified by the Request-URI be moved to the address specified in 2660 the Destination header, and all resources identified by its internal 2661 member URLs are to be moved to locations relative to it, recursively 2662 through all levels of the collection hierarchy. 2664 The MOVE method on a collection MUST act as if a "Depth: infinity" 2665 header was used on it. A client MUST NOT submit a Depth header on a 2666 MOVE on a collection with any value but "infinity". 2668 Any headers included with MOVE MUST be applied in processing every 2669 resource to be moved with the exception of the Destination header. 2670 The behavior of the Destination header is the same as given for COPY 2671 on collections. 2673 When the MOVE method has completed processing it MUST have created a 2674 consistent URL namespace at both the source and destination (see 2675 section 5.1 for the definition of namespace consistency). However, 2676 if an error occurs while moving an internal collection, the server 2677 MUST NOT move any resources identified by members of the failed 2678 collection (i.e., the server must skip the error-causing subtree), as 2679 this would create an inconsistent namespace. In this case, after 2680 detecting the error, the move operation SHOULD try to finish as much 2681 of the original move as possible (i.e., the server should still 2682 attempt to move other subtrees and the resources identified by their 2683 members, that are not descendents of an error-causing collection). 2684 So, for example, if an infinite depth move is performed on collection 2685 /a/, which contains collections /a/b/ and /a/c/, and an error occurs 2686 moving /a/b/, an attempt should still be made to try moving /a/c/. 2687 Similarly, after encountering an error moving a non-collection 2688 resource as part of an infinite depth move, the server SHOULD try to 2689 finish as much of the original move operation as possible. 2691 If an error occurs with a resource other than the resource identified 2692 in the Request-URI then the response MUST be a 207 (Multi-Status), 2693 and the errored resource's URL MUST appear with the specific error. 2695 The 424 (Failed Dependency) status code SHOULD NOT be returned in the 2696 207 (Multi-Status) response from a MOVE method. These errors can be 2697 safely omitted because the client will know that the progeny of a 2698 resource could not be moved when the client receives an error for the 2699 parent. Additionally 201 (Created)/204 (No Content) responses SHOULD 2700 NOT be returned as values in 207 (Multi-Status) responses from a 2701 MOVE. These responses can be safely omitted because they are the 2702 default success codes. 2704 9.9.3. MOVE and the Overwrite Header 2706 If a resource exists at the destination and the Overwrite header is 2707 "T" then prior to performing the move the server MUST perform a 2708 DELETE with "Depth: infinity" on the destination resource. If the 2709 Overwrite header is set to "F" then the operation will fail. 2711 9.9.4. Status Codes 2713 In addition to the general status codes possible, the following 2714 status codes have specific applicability to MOVE: 2716 201 (Created) - The source resource was successfully moved, and a new 2717 URL mapping was created at the destination. 2719 204 (No Content) - The source resource was successfully moved to a 2720 URL that was already mapped. 2722 207 (Multi-Status) - Multiple resources were to be affected by the 2723 MOVE, but errors on some of them prevented the operation from taking 2724 place. Specific error messages, together with the most appropriate 2725 of the source and destination URLs, appear in the body of the multi- 2726 status response. E.g. if a source resource was locked and could not 2727 be moved, then the source resource URL appears with the 423 (Locked) 2728 status. 2730 403 (Forbidden) - Among many possible reasons for forbidding a MOVE 2731 operation, this status code is recommended for use when the source 2732 and destination resources are the same. 2734 409 (Conflict) - A resource cannot be created at the destination 2735 until one or more intermediate collections have been created. The 2736 server MUST NOT create those intermediate collections automatically. 2737 Or, the server was unable to preserve the behavior of the live 2738 properties and still move the resource to the destination (see 2739 'preserved-live-properties' postcondition). 2741 412 (Precondition Failed) - A condition header failed. Specific to 2742 MOVE, this could mean that the Overwrite header is "F" and the 2743 destination URL is already mapped to a resource. 2745 423 (Locked) - The source or the destination resource, the source or 2746 destination resource parent, or some resource within the source or 2747 destination collection, was locked. This response SHOULD contain the 2748 'lock-token-submitted' precondition element. 2750 502 (Bad Gateway) - This may occur when the destination is on another 2751 server and the destination server refuses to accept the resource. 2752 This could also occur when the destination is on another sub-section 2753 of the same server namespace. 2755 9.9.5. Example - MOVE of a Non-Collection 2757 This example shows resource 2758 http://www.example.com/~fielding/index.html being moved to the 2759 location http://www.example.com/users/f/fielding/index.html. The 2760 contents of the destination resource would have been overwritten if 2761 the destination URL was already mapped to a resource. In this case, 2762 since there was nothing at the destination resource, the response 2763 code is 201 (Created). 2765 >>Request 2767 MOVE /~fielding/index.html HTTP/1.1 2768 Host: www.example.com 2769 Destination: http://www.example/users/f/fielding/index.html 2771 >>Response 2773 HTTP/1.1 201 Created 2774 Location: http://www.example.com/users/f/fielding/index.html 2776 9.9.6. Example - MOVE of a Collection 2778 >>Request 2780 MOVE /container/ HTTP/1.1 2781 Host: www.example.com 2782 Destination: http://www.example.com/othercontainer/ 2783 Overwrite: F 2784 If: () 2785 () 2787 >>Response 2789 HTTP/1.1 207 Multi-Status 2790 Content-Type: application/xml; charset="utf-8" 2791 Content-Length: xxxx 2793 2794 2795 2796 http://www.example.com/othercontainer/C2/ 2797 HTTP/1.1 423 Locked 2798 2799 2800 2802 In this example the client has submitted a number of lock tokens with 2803 the request. A lock token will need to be submitted for every 2804 resource, both source and destination, anywhere in the scope of the 2805 method, that is locked. In this case the proper lock token was not 2806 submitted for the destination 2807 http://www.example.com/othercontainer/C2/. This means that the 2808 resource /container/C2/ could not be moved. Because there was an 2809 error moving /container/C2/, none of /container/C2's members were 2810 moved. However no errors were listed for those members due to the 2811 error minimization rules. User agent authentication has previously 2812 occurred via a mechanism outside the scope of the HTTP protocol, in 2813 an underlying transport layer. 2815 9.10. LOCK Method 2817 The following sections describe the LOCK method, which is used to 2818 take out a lock of any access type and to refresh an existing lock. 2819 These sections on the LOCK method describe only those semantics that 2820 are specific to the LOCK method and are independent of the access 2821 type of the lock being requested. 2823 Any resource which supports the LOCK method MUST, at minimum, support 2824 the XML request and response formats defined herein. 2826 This method is neither idempotent nor safe (see Section 9.1 of 2827 [RFC2616]). Responses to this method MUST NOT be cached. 2829 9.10.1. Creating a lock on existing resource 2831 A LOCK request to an existing resource will create a lock on the 2832 resource identified by the Request-URI, provided the resource is not 2833 already locked with a conflicting lock. The resource identified in 2834 the Request-URI becomes the root of the lock. Lock method requests 2835 to create a new lock MUST have an XML request body. The server MUST 2836 preserve the information provided by the client in the 'owner' field 2837 in the request body when the lock information is requested. The LOCK 2838 request MAY have a Timeout header. 2840 When a new lock is created, the LOCK response: 2842 o MUST contain a body with the value of the DAV:lockdiscovery 2843 property in a prop XML element. This MUST contain the full 2844 information about the lock just granted, while information about 2845 other (shared) locks is OPTIONAL. 2847 o MUST include the Lock-Token response header with the token 2848 associated with the new lock. 2850 9.10.2. Refreshing Locks 2852 A lock is refreshed by sending a LOCK request to the URL of a 2853 resource within the scope of the lock. This request MUST NOT have a 2854 body and it MUST specify which lock to refresh by using the 'If' 2855 header with a single lock token (only one lock may be refreshed at a 2856 time). The request MAY contain a Timeout header, which a server MAY 2857 accept to change the duration remaining on the lock to the new value. 2858 A server MUST ignore the Depth header on a LOCK refresh. 2860 If the resource has other (shared) locks, those locks are unaffected 2861 by a lock refresh. Additionally, those locks do not prevent the 2862 named lock from being refreshed. 2864 The Lock-Token header is not returned in the response for a 2865 successful refresh LOCK request, but the LOCK response body MUST 2866 contain the new value for the DAV:lockdiscovery body. 2868 9.10.3. Depth and Locking 2870 The Depth header may be used with the LOCK method. Values other than 2871 0 or infinity MUST NOT be used with the Depth header on a LOCK 2872 method. All resources that support the LOCK method MUST support the 2873 Depth header. 2875 A Depth header of value 0 means to just lock the resource specified 2876 by the Request-URI. 2878 If the Depth header is set to infinity then the resource specified in 2879 the Request-URI along with all its members, all the way down the 2880 hierarchy, are to be locked. A successful result MUST return a 2881 single lock token. Similarly, if an UNLOCK is successfully executed 2882 on this token, all associated resources are unlocked. Hence, partial 2883 success is not an option for LOCK or UNLOCK. Either the entire 2884 hierarchy is locked or no resources are locked. 2886 If the lock cannot be granted to all resources, the server MUST 2887 return a Multi-Status response with a 'response' element for at least 2888 one resource which prevented the lock from being granted, along with 2889 a suitable status code for that failure (e.g. 403 (Forbidden) or 423 2890 (Locked)). Additionally, if the resource causing the failure was not 2891 the resource requested, then the server SHOULD include a 'response' 2892 element for the Request-URI as well, with a 'status' element 2893 containing 424 Failed Dependency. 2895 If no Depth header is submitted on a LOCK request then the request 2896 MUST act as if a "Depth:infinity" had been submitted. 2898 9.10.4. Locking Unmapped URLs 2900 A successful LOCK method MUST result in the creation of an empty 2901 resource which is locked (and which is not a collection), when a 2902 resource did not previously exist at that URL. Later on, the lock 2903 may go away but the empty resource remains. Empty resources MUST 2904 then appear in PROPFIND responses including that URL in the response 2905 scope. A server MUST respond successfully to a GET request to an 2906 empty resource, either by using a 204 No Content response, or by 2907 using 200 OK with a Content-Length header indicating zero length 2909 9.10.5. Lock Compatibility Table 2911 The table below describes the behavior that occurs when a lock 2912 request is made on a resource. 2914 +--------------------------+----------------+-------------------+ 2915 | Current State | Shared Lock OK | Exclusive Lock OK | 2916 +--------------------------+----------------+-------------------+ 2917 | None | True | True | 2918 | | | | 2919 | Shared Lock | True | False | 2920 | | | | 2921 | Exclusive Lock | False | False* | 2922 +--------------------------+----------------+-------------------+ 2924 Legend: True = lock may be granted. False = lock MUST NOT be 2925 granted. *=It is illegal for a principal to request the same lock 2926 twice. 2928 The current lock state of a resource is given in the leftmost column, 2929 and lock requests are listed in the first row. The intersection of a 2930 row and column gives the result of a lock request. For example, if a 2931 shared lock is held on a resource, and an exclusive lock is 2932 requested, the table entry is "false", indicating the lock must not 2933 be granted. 2935 9.10.6. LOCK Responses 2937 In addition to the general status codes possible, the following 2938 status codes have specific applicability to LOCK: 2940 200 (OK) - The LOCK request succeeded and the value of the DAV: 2941 lockdiscovery property is included in the response body. 2943 201 (Created) - The LOCK request was to an unmapped URL, the request 2944 succeeded and resulted in the creation of a new resource, and the 2945 value of the DAV:lockdiscovery property is included in the response 2946 body. 2948 409 (Conflict) - A resource cannot be created at the destination 2949 until one or more intermediate collections have been created. The 2950 server MUST NOT create those intermediate collections automatically. 2952 423 (Locked), potentially with 'no-conflicting-lock' precondition 2953 code - There is already a lock on the resource which is not 2954 compatible with the requested lock (see lock compatibility table 2955 above). 2957 412 (Precondition Failed), with 'lock-token-matches-request-uri' 2958 precondition code - The LOCK request was made with a If header, 2959 indicating that the client wishes to refresh the given lock. 2960 However, the Request-URI did not fall within the scope of the lock 2961 identified by the token. The lock may have a scope that does not 2962 include the Request-URI, or the lock could have disappeared, or the 2963 token may be invalid. 2965 9.10.7. Example - Simple Lock Request 2967 >>Request 2969 LOCK /workspace/webdav/proposal.doc HTTP/1.1 2970 Host: example.com 2971 Timeout: Infinite, Second-4100000000 2972 Content-Type: application/xml; charset="utf-8" 2973 Content-Length: xxxx 2974 Authorization: Digest username="ejw", 2975 realm="ejw@example.com", nonce="...", 2976 uri="/workspace/webdav/proposal.doc", 2977 response="...", opaque="..." 2979 2980 2981 2982 2983 2984 http://example.org/~ejw/contact.html 2985 2986 2988 >>Response 2990 HTTP/1.1 200 OK 2991 Lock-Token: 2992 Content-Type: application/xml; charset="utf-8" 2993 Content-Length: xxxx 2995 2996 2997 2998 2999 3000 3001 infinity 3002 3003 http://example.org/~ejw/contact.html 3004 3005 Second-604800 3006 3007 urn:uuid:e71d4fae-5dec-22d6-fea5-00a0c91e6be4 3009 3010 3011 http://example.com/workspace/webdav/proposal.doc 3013 3014 3015 3016 3018 This example shows the successful creation of an exclusive write lock 3019 on resource http://example.com/workspace/webdav/proposal.doc. The 3020 resource http://example.org/~ejw/contact.html contains contact 3021 information for the creator of the lock. The server has an activity- 3022 based timeout policy in place on this resource, which causes the lock 3023 to automatically be removed after 1 week (604800 seconds). Note that 3024 the nonce, response, and opaque fields have not been calculated in 3025 the Authorization request header. 3027 9.10.8. Example - Refreshing a Write Lock 3029 >>Request 3031 LOCK /workspace/webdav/proposal.doc HTTP/1.1 3032 Host: example.com 3033 Timeout: Infinite, Second-4100000000 3034 Lock-Token: 3035 Authorization: Digest username="ejw", 3036 realm="ejw@example.com", nonce="...", 3037 uri="/workspace/webdav/proposal.doc", 3038 response="...", opaque="..." 3040 >>Response 3042 HTTP/1.1 200 OK 3043 Content-Type: application/xml; charset="utf-8" 3044 Content-Length: xxxx 3046 3047 3048 3049 3050 3051 3052 infinity 3053 3054 http://example.org/~ejw/contact.html 3055 3056 Second-604800 3057 3058 urn:uuid:e71d4fae-5dec-22d6-fea5-00a0c91e6be4 3060 3061 3062 http://example.com/workspace/webdav/proposal.doc 3064 3065 3066 3067 3069 This request would refresh the lock, attempting to reset the timeout 3070 to the new value specified in the timeout header. Notice that the 3071 client asked for an infinite time out but the server choose to ignore 3072 the request. In this example, the nonce, response, and opaque fields 3073 have not been calculated in the Authorization request header. 3075 9.10.9. Example - Multi-Resource Lock Request 3077 >>Request 3079 LOCK /webdav/ HTTP/1.1 3080 Host: example.com 3081 Timeout: Infinite, Second-4100000000 3082 Depth: infinity 3083 Content-Type: application/xml; charset="utf-8" 3084 Content-Length: xxxx 3085 Authorization: Digest username="ejw", 3086 realm="ejw@example.com", nonce="...", 3087 uri="/workspace/webdav/proposal.doc", 3088 response="...", opaque="..." 3090 3091 3092 3093 3094 3095 http://example.org/~ejw/contact.html 3096 3097 3099 >>Response 3101 HTTP/1.1 207 Multi-Status 3102 Content-Type: application/xml; charset="utf-8" 3103 Content-Length: xxxx 3105 3106 3107 3108 http://example.com/webdav/secret 3109 HTTP/1.1 403 Forbidden 3110 3111 3112 http://example.com/webdav/ 3113 HTTP/1.1 424 Failed Dependency 3114 3115 3117 This example shows a request for an exclusive write lock on a 3118 collection and all its children. In this request, the client has 3119 specified that it desires an infinite length lock, if available, 3120 otherwise a timeout of 4.1 billion seconds, if available. The 3121 request entity body contains the contact information for the 3122 principal taking out the lock, in this case a web page URL. 3124 The error is a 403 (Forbidden) response on the resource 3125 http://example.com/webdav/secret. Because this resource could not be 3126 locked, none of the resources were locked. Note also that the a 3127 'response' element for the Request-URI itself has been included as 3128 required. 3130 In this example, the nonce, response, and opaque fields have not been 3131 calculated in the Authorization request header. 3133 9.11. UNLOCK Method 3135 The UNLOCK method removes the lock identified by the lock token in 3136 the Lock-Token request header. The Request-URI MUST identify a 3137 resource within the scope of the lock. 3139 Note that use of Lock-Token header to provide the lock token is not 3140 consistent with other state-changing methods which all require an If 3141 header with the lock token. Thus, the If header is not needed to 3142 provide the lock token. Naturally when the If header is present it 3143 has its normal meaning as a conditional header. 3145 For a successful response to this method, the server MUST delete the 3146 lock entirely. 3148 If all resources which have been locked under the submitted lock 3149 token can not be unlocked then the UNLOCK request MUST fail. 3151 A successful response to an UNLOCK method does not mean that the 3152 resource is necessarily unlocked. It means that the specific lock 3153 corresponding to the specified token no longer exists. 3155 Any DAV compliant resource which supports the LOCK method MUST 3156 support the UNLOCK method. 3158 This method is idempotent, but not safe (see Section 9.1 of 3159 [RFC2616]). Responses to this method MUST NOT be cached. 3161 9.11.1. Status Codes 3163 In addition to the general status codes possible, the following 3164 status codes have specific applicability to UNLOCK: 3166 204 (No Content) - Normal success response (rather than 200 OK, since 3167 200 OK would imply a response body, and an UNLOCK success response 3168 does not normally contain a body) 3169 400 (Bad Request) - No lock token was provided. 3171 403 (Forbidden) - The currently authenticated principal does not have 3172 permission to remove the lock. 3174 409 (Conflict), with 'lock-token-matches-request-uri' precondition - 3175 The resource was not locked, or the request was made to a Request-URI 3176 that was not within the scope of the lock. 3178 9.11.2. Example - UNLOCK 3180 >>Request 3182 UNLOCK /workspace/webdav/info.doc HTTP/1.1 3183 Host: example.com 3184 Lock-Token: 3185 Authorization: Digest username="ejw" 3186 realm="ejw@example.com", nonce="...", 3187 uri="/workspace/webdav/proposal.doc", 3188 response="...", opaque="..." 3190 >>Response 3192 HTTP/1.1 204 No Content 3194 In this example, the lock identified by the lock token 3195 "urn:uuid:a515cfa4-5da4-22e1-f5b5-00a0451e6bf7" is successfully 3196 removed from the resource 3197 http://example.com/workspace/webdav/info.doc. If this lock included 3198 more than just one resource, the lock is removed from all resources 3199 included in the lock. 3201 In this example, the nonce, response, and opaque fields have not been 3202 calculated in the Authorization request header. 3204 10. HTTP Headers for Distributed Authoring 3206 All DAV headers follow the same basic formatting rules as HTTP 3207 headers. This includes rules like line continuation and how to 3208 combine (or separate) multiple instances of the same header using 3209 commas. 3211 WebDAV adds two new conditional headers to the set defined in HTTP: 3212 the If and Overwrite headers. 3214 10.1. DAV Header 3216 DAV = "DAV" ":" #( compliance-class ) 3217 compliance-class = ( "1" | "2" | "3" | extend ) 3218 extend = Coded-URL | token 3219 Coded-URL = "<" absolute-URI ">" 3220 ; No LWS allowed in Coded-URL 3221 ; absolute-URI is defined in RFC3986 3223 This general-header appearing in the response indicates that the 3224 resource supports the DAV schema and protocol as specified. All DAV 3225 compliant resources MUST return the DAV header with compliance-class 3226 "1" on all OPTIONS responses. In cases where WebDAV is only 3227 supported in part of the server namespace, an OPTIONS request to non- 3228 WebDAV resources (including "/") SHOULD NOT advertise WebDAV support. 3230 The value is a comma-separated list of all compliance class 3231 identifiers that the resource supports. Class identifiers may be 3232 Coded-URLs or tokens (as defined by [RFC2616]). Identifiers can 3233 appear in any order. Identifiers that are standardized through the 3234 IETF RFC process are tokens, but other identifiers SHOULD be Coded- 3235 URLs to encourage uniqueness. 3237 A resource must show class 1 compliance if it shows class 2 or 3 3238 compliance. In general, support for one compliance class does not 3239 entail support for any other, and in particular, support for 3240 compliance class 3 does not require support for compliance class 2. 3241 Please refer to Section 18 for more details on compliance classes 3242 defined in this specification. 3244 Note that many WebDAV servers do not advertise WebDAV support in 3245 response to "OPTIONS *". 3247 As a request header, this header allows the client to advertise 3248 compliance with named features when the server needs that 3249 information. Clients SHOULD NOT send this header unless a standards 3250 track specification requires it. Any extension that makes use of 3251 this as a request header will need to carefully consider caching 3252 implications. 3254 10.2. Depth Header 3256 Depth = "Depth" ":" ("0" | "1" | "infinity") 3258 The Depth request header is used with methods executed on resources 3259 which could potentially have internal members to indicate whether the 3260 method is to be applied only to the resource ("Depth: 0"), to the 3261 resource and its internal members only, ("Depth: 1"), or the resource 3262 and all its members ("Depth: infinity"). 3264 The Depth header is only supported if a method's definition 3265 explicitly provides for such support. 3267 The following rules are the default behavior for any method that 3268 supports the Depth header. A method may override these defaults by 3269 defining different behavior in its definition. 3271 Methods which support the Depth header may choose not to support all 3272 of the header's values and may define, on a case by case basis, the 3273 behavior of the method if a Depth header is not present. For 3274 example, the MOVE method only supports "Depth: infinity" and if a 3275 Depth header is not present will act as if a "Depth: infinity" header 3276 had been applied. 3278 Clients MUST NOT rely upon methods executing on members of their 3279 hierarchies in any particular order or on the execution being atomic 3280 unless the particular method explicitly provides such guarantees. 3282 Upon execution, a method with a Depth header will perform as much of 3283 its assigned task as possible and then return a response specifying 3284 what it was able to accomplish and what it failed to do. 3286 So, for example, an attempt to COPY a hierarchy may result in some of 3287 the members being copied and some not. 3289 By default, the Depth header does not interact with other headers. 3290 That is, each header on a request with a Depth header MUST be applied 3291 only to the Request-URI if it applies to any resource, unless 3292 specific Depth behavior is defined for that header. 3294 If a resource, source or destination, within the scope of the method 3295 with a Depth header is locked in such a way as to prevent the 3296 successful execution of the method, then the lock token for that 3297 resource MUST be submitted with the request in the If request header. 3299 The Depth header only specifies the behavior of the method with 3300 regards to internal members. If a resource does not have internal 3301 members then the Depth header MUST be ignored. 3303 10.3. Destination Header 3305 The Destination request header specifies the URI which identifies a 3306 destination resource for methods such as COPY and MOVE, which take 3307 two URIs as parameters. 3309 Destination = "Destination" ":" Simple-ref 3311 If the Destination value is an absolute-URI (Section 4.3 of 3312 [RFC3986]), it may name a different server (or different port or 3313 scheme). If the source server cannot attempt a copy to the remote 3314 server, it MUST fail the request. Note that copying and moving 3315 resources to remote servers is not fully defined in this 3316 specification (e.g. specific error conditions). 3318 If the Destination value is too long or otherwise unacceptable, the 3319 server SHOULD return 400 (Bad Request), ideally with helpful 3320 information in an error body. 3322 10.4. If Header 3324 The If request header is intended to have similar functionality to 3325 the If-Match header defined in Section 14.24 of [RFC2616]. However 3326 the If header handles any state token as well as ETags. A typical 3327 example of a state token is a lock token, and lock tokens are the 3328 only state tokens defined in this specification. 3330 10.4.1. Purpose 3332 The If header has two distinct purposes: 3334 o The first purpose is to make a request conditional by supplying a 3335 series of state lists with conditions that match tokens and ETags 3336 to specific resource. If this header is evaluated and all state 3337 lists fail, then the request MUST fail with a 412 (Precondition 3338 Failed) status. On the other hand, the request can succeed only 3339 if one of the described state lists succeeds. The success 3340 criteria for state lists and matching functions are defined in 3341 Section 10.4.3 and Section 10.4.4. 3343 o Additionally, the mere fact that a state token appears in an If 3344 header means that it has been "submitted" with the request. In 3345 general, this is used to indicate that the client has knowledge of 3346 that state token. The semantics for submitting a state token 3347 depend on its type (for lock tokens, please refer to Section 6). 3349 Note that these two purposes need to be treated distinctly: a state 3350 token counts as being submitted independently of whether the server 3351 actually has evaluated the state list it appears in, and also 3352 independently of whether the condition it expressed was found to be 3353 true or not. 3355 10.4.2. Syntax 3357 If = "If" ":" ( 1*No-tag-list | 1*Tagged-list ) 3359 No-tag-list = List 3360 Tagged-list = Resource-Tag 1*List 3362 List = "(" 1*Condition ")" 3363 Condition = ["Not"] (State-token | "[" entity-tag "]") 3364 ; entity-tag: see Section 3.11 of [RFC2616] 3365 ; No LWS allowed between "[", entity-tag and "]" 3367 State-token = Coded-URL 3369 Resource-Tag = "<" Simple-ref ">" 3370 ; Simple-ref: see Section 8.3 3371 ; No LWS allowed in Resource-Tag 3373 The syntax distinguishes between untagged lists ("No-tag-list") and 3374 tagged lists ("Tagged-list"). Untagged lists apply to the resource 3375 identified by the Request-URI, while tagged lists apply to the 3376 resource identified by the preceding Resource-Tag. 3378 A Resource-Tag applies to all subsequent Lists, up to the next 3379 Resource-Tag. 3381 Note that the two list types cannot be mixed within an If header. 3382 This is not a functional restriction because the No-tag-list syntax 3383 is just a shorthand notation for a Tagged-list production with a 3384 Resource-Tag referring to the Request-URI. 3386 Each List consists of one or more Conditions. Each Condition is 3387 defined in terms of an entity-tag or state-token, potentially negated 3388 by the prefix "Not". 3390 Note that the If header syntax does not allow multiple instances of 3391 If headers in a single request. However, the HTTP header syntax 3392 allows extending single header values across multiple lines, by 3393 inserting a line break followed by whitespace (see [RFC2616], Section 3394 4.2). 3396 10.4.3. List Evaluation 3398 A Condition that consists of a single entity-tag or state-token 3399 evaluates to true if the resource matches the described state (where 3400 the individual matching functions are defined below in 3401 Section 10.4.4). Prefixing it with "Not" reverses the result of the 3402 evaluation (thus, the "Not" applies only to the subsequent entity-tag 3403 or state-token). 3405 Each List production describes a series of conditions. The whole 3406 list evaluates to true if and only if each condition evaluates to 3407 true (that is, the list represents a logical conjunction of 3408 Conditions). 3410 Each No-tag-list and Tagged-list production may contain one or more 3411 Lists. They evaluate to true if and only if any of the contained 3412 lists evaluates to true (that is, if there's more than one List, that 3413 List sequence represents a logical disjunction of the Lists). 3415 Finally, the whole If header evaluates to true if and only if at 3416 least one of the No-tag-list or Tagged-list productions evaluates to 3417 true. If the header evaluates to false, the server MUST reject the 3418 request with a 412 (Precondition Failed) status. Otherwise, 3419 execution of the request can proceed as if the header wasn't present. 3421 10.4.4. Matching State Tokens and ETags 3423 When performing If header processing, the definition of a matching 3424 state token or entity tag is as follows: 3426 Identifying a resource: The resource is identified by the URI along 3427 with the token, in tagged list production, or by the Request-URI in 3428 untagged list production. 3430 Matching entity tag: Where the entity tag matches an entity tag 3431 associated with the identified resource. Servers MUST use either the 3432 weak or the strong comparison function defined in Section 13.3.3 of 3433 [RFC2616]. 3435 Matching state token: Where there is an exact match between the state 3436 token in the If header and any state token on the identified 3437 resource. A lock state token is considered to match if the resource 3438 is anywhere in the scope of the lock. 3440 Handling unmapped URLs: for both ETags and state tokens, treat as if 3441 the URL identified a resource that exists but does not have the 3442 specified state. 3444 10.4.5. If Header and Non-DAV Aware Proxies 3446 Non-DAV aware proxies will not honor the If header, since they will 3447 not understand the If header, and HTTP requires non-understood 3448 headers to be ignored. When communicating with HTTP/1.1 proxies, the 3449 client MUST use the "Cache-Control: no-cache" request header so as to 3450 prevent the proxy from improperly trying to service the request from 3451 its cache. When dealing with HTTP/1.0 proxies the "Pragma: no-cache" 3452 request header MUST be used for the same reason. 3454 As in general clients may not be able to reliably detect non-DAV 3455 aware intermediates, they are advised to always prevent caching using 3456 the request directives mentioned above. 3458 10.4.6. Example - No-tag Production 3460 If: ( 3461 ["I am an ETag"]) 3462 (["I am another ETag"]) 3464 The previous header would require that the resource identified in the 3465 Request-URI be locked with the specified lock token and be in the 3466 state identified by the "I am an ETag" ETag or in the state 3467 identified by the second ETag "I am another ETag". 3469 To put the matter more plainly one can think of the previous If 3470 header as expressing the condition below: 3472 ( 3473 is-locked-with(urn:uuid:181d4fae-7d8c-11d0-a765-00a0c91e6bf2) AND 3474 matches-etag("I am an ETag") 3475 ) 3476 OR 3477 ( 3478 matches-etag("I am another ETag") 3479 ) 3481 10.4.7. Example - using "Not" with No-tag Production 3483 If: (Not 3484 ) 3486 This If header requires that the resource must not be locked with a 3487 lock having the lock token 3488 urn:uuid:181d4fae-7d8c-11d0-a765-00a0c91e6bf2 and must be locked by a 3489 lock with the lock token 3490 urn:uuid:58f202ac-22cf-11d1-b12d-002035b29092. 3492 10.4.8. Example - causing a Condition to always evaluate to True 3494 There may be cases where a client wishes to submit state tokens, but 3495 doesn't want the request to fail just because the state token isn't 3496 current anymore. One simple way to do this is to include a Condition 3497 that is known to always evaluate to true, such as in: 3499 If: () 3500 (Not ) 3502 "DAV:no-lock" is known to never represent a current lock token, as 3503 lock tokens are assigned by the server, following the uniqueness 3504 requirements described in Section 6.5, therefore in particular 3505 exclude URIs in the "DAV:" scheme. Thus, by applying "Not" to a 3506 known not to be current state token, the Condition always evaluates 3507 to true. Consequently, the whole If header will always evaluate to 3508 true, and the lock token 3509 urn:uuid:181d4fae-7d8c-11d0-a765-00a0c91e6bf2 will be submitted in 3510 any case. 3512 10.4.9. Example - Tagged List If header in COPY 3514 >>Request 3516 COPY /resource1 HTTP/1.1 3517 Host: www.example.com 3518 Destination: /resource2 3519 If: 3520 ( 3521 [W/"A weak ETag"]) (["strong ETag"]) 3523 In this example http://www.example.com/resource1 is being copied to 3524 http://www.example.com/resource2. When the method is first applied 3525 to http://www.example.com/resource1, resource1 must be in the state 3526 specified by "( [W/"A 3527 weak ETag"]) (["strong ETag"])", that is, it either must be locked 3528 with a lock token of "urn:uuid:181d4fae-7d8c-11d0-a765-00a0c91e6bf2" 3529 and have a weak entity tag W/"A weak ETag" or it must have a strong 3530 entity tag "strong ETag". 3532 10.4.10. Example - Matching lock tokens with collection locks 3534 DELETE /specs/rfc2518.txt HTTP/1.1 3535 Host: www.example.com 3536 If: 3537 () 3539 For this example, the lock token must be compared to the identified 3540 resource, which is the 'specs' collection identified by the URL in 3541 the tagged list production. If the 'specs' collection is not locked 3542 by a lock with the specified lock token, the request MUST fail. 3543 Otherwise, this request could succeed, because the If header 3544 evaluates to true, and because the lock token for the lock affecting 3545 the affected resource has been submitted. 3547 10.4.11. Example - Matching ETags on unmapped URLs 3549 Consider a collection "/specs" that does not contain the member 3550 "/specs/rfc2518.doc". In this case, the If header 3552 If: (["4217"]) 3554 will evaluate to false (the URI isn't mapped, thus the resource 3555 identified by the URI doesn't have an entity matching the ETag 3556 "4217"). 3558 On the other hand, an If header of 3560 If: (Not ["4217"]) 3562 will consequently evaluate to true. 3564 Note that as defined above in Section 10.4.4, the same considerations 3565 apply to matching state tokens. 3567 10.5. Lock-Token Header 3569 Lock-Token = "Lock-Token" ":" Coded-URL 3571 The Lock-Token request header is used with the UNLOCK method to 3572 identify the lock to be removed. The lock token in the Lock-Token 3573 request header MUST identify a lock that contains the resource 3574 identified by Request-URI as a member. 3576 The Lock-Token response header is used with the LOCK method to 3577 indicate the lock token created as a result of a successful LOCK 3578 request to create a new lock. 3580 10.6. Overwrite Header 3582 Overwrite = "Overwrite" ":" ("T" | "F") 3584 The Overwrite request header specifies whether the server should 3585 overwrite a resource mapped to the destination URL during a COPY or 3586 MOVE. A value of "F" states that the server must not perform the 3587 COPY or MOVE operation if the destination URL does map to a resource. 3589 If the overwrite header is not included in a COPY or MOVE request 3590 then the resource MUST treat the request as if it has an overwrite 3591 header of value "T". While the Overwrite header appears to duplicate 3592 the functionality of the If-Match: * header of HTTP/1.1, If-Match 3593 applies only to the Request-URI, and not to the Destination of a COPY 3594 or MOVE. 3596 If a COPY or MOVE is not performed due to the value of the Overwrite 3597 header, the method MUST fail with a 412 (Precondition Failed) status 3598 code. The server MUST do authorization checks before checking this 3599 or any conditional header. 3601 All DAV compliant resources MUST support the Overwrite header. 3603 10.7. Timeout Request Header 3605 TimeOut = "Timeout" ":" 1#TimeType 3606 TimeType = ("Second-" DAVTimeOutVal | "Infinite") 3607 ; No LWS allowed within TimeType 3608 DAVTimeOutVal = 1*DIGIT 3610 Clients MAY include Timeout request headers in their LOCK requests. 3611 However, the server is not required to honor or even consider these 3612 requests. Clients MUST NOT submit a Timeout request header with any 3613 method other than a LOCK method. 3615 The "Second" TimeType specifies the number of seconds that will 3616 elapse between granting of the lock at the server, and the automatic 3617 removal of the lock. The timeout value for TimeType "Second" MUST 3618 NOT be greater than 2^32-1. 3620 See Section 6.6 for a description of lock timeout behavior. 3622 11. Status Code Extensions to HTTP/1.1 3624 The following status codes are added to those defined in HTTP/1.1 3625 [RFC2616]. 3627 11.1. 207 Multi-Status 3629 The 207 (Multi-Status) status code provides status for multiple 3630 independent operations (see Section 13 for more information). 3632 11.2. 422 Unprocessable Entity 3634 The 422 (Unprocessable Entity) status code means the server 3635 understands the content type of the request entity (hence a 3636 415(Unsupported Media Type) status code is inappropriate), and the 3637 syntax of the request entity is correct (thus a 400 (Bad Request) 3638 status code is inappropriate) but was unable to process the contained 3639 instructions. For example, this error condition may occur if an XML 3640 request body contains well-formed (i.e., syntactically correct), but 3641 semantically erroneous XML instructions. 3643 11.3. 423 Locked 3645 The 423 (Locked) status code means the source or destination resource 3646 of a method is locked. This response SHOULD contain an appropriate 3647 precondition or postcondition code, such as 'lock-token-submitted' or 3648 'no-conflicting-lock". 3650 11.4. 424 Failed Dependency 3652 The 424 (Failed Dependency) status code means that the method could 3653 not be performed on the resource because the requested action 3654 depended on another action and that action failed. For example, if a 3655 command in a PROPPATCH method fails then, at minimum, the rest of the 3656 commands will also fail with 424 (Failed Dependency). 3658 11.5. 507 Insufficient Storage 3660 The 507 (Insufficient Storage) status code means the method could not 3661 be performed on the resource because the server is unable to store 3662 the representation needed to successfully complete the request. This 3663 condition is considered to be temporary. If the request which 3664 received this status code was the result of a user action, the 3665 request MUST NOT be repeated until it is requested by a separate user 3666 action. 3668 12. Use of HTTP Status Codes 3670 These HTTP codes are not redefined, but their use is somewhat 3671 extended by WebDAV methods and requirements. In general, many HTTP 3672 status codes can be used in response to any request, not just in 3673 cases described in this document. Note also that WebDAV servers are 3674 known to use 300-level redirect responses (and early interoperability 3675 tests found clients unprepared to see those responses). A 300-level 3676 response MUST NOT be used when the server has created a new resource 3677 in response to the request. 3679 12.1. 412 Precondition Failed 3681 Any request can contain a conditional header defined in HTTP (If- 3682 Match, If-Modified-Since, etc.) or the "If" or "Overwrite" 3683 conditional headers defined in this specification. If the server 3684 evaluates a conditional header, and if that condition fails to hold, 3685 then this error code MUST be returned. On the other hand, if the 3686 client did not include a conditional header in the request, then the 3687 server MUST NOT use this status code. 3689 12.2. 414 Request-URI Too Long 3691 This status code is used in HTTP 1.1 only for Request-URIs, not URIs 3692 in other locations. 3694 13. Multi-Status Response 3696 A Multi-Status response conveys information about multiple resources 3697 in situations where multiple status codes might be appropriate. The 3698 default Multi-Status response body is a text/xml or application/xml 3699 HTTP entity with a 'multistatus' root element. Further elements 3700 contain 200, 300, 400, and 500 series status codes generated during 3701 the method invocation. 100 series status codes SHOULD NOT be recorded 3702 in a 'response' XML element. 3704 Although '207' is used as the overall response status code, the 3705 recipient needs to consult the contents of the multistatus response 3706 body for further information about the success or failure of the 3707 method execution. The response MAY be used in success, partial 3708 success and also in failure situations. 3710 The 'multistatus' root element holds zero or more 'response' elements 3711 in any order, each with information about an individual resource. 3712 Each 'response' element MUST have an 'href' element to identify the 3713 resource. 3715 A Multi-Status response uses one out of two distinct formats for 3716 representing the status: 3718 1. A 'status' element as child of the 'response' element indicates 3719 the status of the message excecution for the identified resource 3720 as a whole (for instance, see Section 9.6.2). Some method 3721 definitions provide information about specific status codes 3722 clients should be prepared to see in a response. However, 3723 clients MUST be able to handle other status codes, using the 3724 generic rules defined in Section 10 of [RFC2616]. 3726 2. For PROPFIND and PROPPATCH, the format has been extended using 3727 the 'propstat' element instead of 'status', providing information 3728 about individual properties of a resource. This format is 3729 specific to PROPFIND and PROPPATCH, and is described in detail in 3730 Section 9.1 and Section 9.2. 3732 13.1. Response headers 3734 HTTP defines the Location header to indicate a preferred URL for the 3735 resource that was addressed in the Request-URI (e.g. in response to 3736 successful PUT requests or in redirect responses). However, use of 3737 this header creates ambiguity when there are URLs in the body of the 3738 response, as with Multi-Status. Thus, use of the Location header 3739 with the Multi-Status response is intentionally undefined. 3741 13.2. Handling redirected child resources 3743 Redirect responses (300-303, 305 and 307) defined in HTTP 1.1 3744 normally take a Location header to indicate the new URI for the 3745 single resource redirected from the Request-URI. Multi-Status 3746 responses contain many resource addresses, but the original 3747 definition in [RFC2518] did not have any place for the server to 3748 provide the new URI for redirected resources. This specification 3749 does define a 'location' element for this information (see 3750 Section 14.9). Servers MUST use this new element with redirect 3751 responses in Multi-Status. 3753 Clients encountering redirected resources in Multi-Status MUST NOT 3754 rely on the 'location' element being present with a new URI. If the 3755 element is not present, the client MAY reissue the request to the 3756 individual redirected resource, because the response to that request 3757 can be redirected with a Location header containing the new URI. 3759 13.3. Internal Status Codes 3761 Section 9.2.1, Section 9.1.2, Section 9.6.1, Section 9.8.3 and 3762 Section 9.9.2 define various status codes used in Multi-Status 3763 responses. This specification does not define the meaning of other 3764 status codes that could appear in these responses. 3766 14. XML Element Definitions 3768 In this section, the final line of each section gives the element 3769 type declaration using the format defined in [REC-XML]. The "Value" 3770 field, where present, specifies further restrictions on the allowable 3771 contents of the XML element using BNF (i.e., to further restrict the 3772 values of a PCDATA element). Note that all of the elements defined 3773 here may be extended according to the rules defined in Section 17. 3774 All elements defined here are in the "DAV:" namespace. 3776 14.1. activelock XML Element 3778 Name: activelock 3780 Purpose: Describes a lock on a resource. 3782 3785 14.2. allprop XML Element 3787 Name: allprop 3789 Purpose: Specifies that all names and values of dead properties and 3790 the live properties defined by this document existing on the 3791 resource are to be returned. 3793 3795 14.3. collection XML Element 3797 Name: collection 3799 Purpose: Identifies the associated resource as a collection. The 3800 DAV:resourcetype property of a collection resource MUST contain 3801 this element. It is normally empty but extensions may add sub- 3802 elements. 3804 3806 14.4. depth XML Element 3808 Name: depth 3809 Purpose: The value of the Depth header. 3811 Value: "0" | "1" | "infinity" 3813 3815 14.5. error XML Element 3817 Name: error 3819 Purpose: Error responses, particularly 403 Forbidden and 409 3820 Conflict, sometimes need more information to indicate what went 3821 wrong. When an error response contains a body in WebDAV, the body 3822 is in XML with the root element 'error'. The 'error' element 3823 SHOULD include a failed precondition or postcondition element. 3825 Description: Contains at least one XML element, and MUST NOT contain 3826 text or mixed content. Any element that is a child of the 'error' 3827 element is considered to be a precondition or postcondition code. 3828 Unrecognized elements SHOULD be ignored. 3830 3832 14.6. exclusive XML Element 3834 Name: exclusive 3836 Purpose: Specifies an exclusive lock. 3838 3840 14.7. href XML Element 3842 Name: href 3844 Purpose: MUST contain a URI or a relative reference. 3846 Description: There may be limits on the value of 'href' depending on 3847 the context of its use. Refer to the specification text where 3848 'href' is used to see what limitations apply in each case. 3850 Value: Simple-ref 3852 3854 14.8. include XML Element 3856 Name: include 3858 Purpose: Any child element represents the name of a property to be 3859 included in the PROPFIND response. All elements inside an 3860 'include' XML element MUST define properties related to the 3861 resource, although possible property names are in no way limited 3862 to those property names defined in this document or other 3863 standards. This element MUST NOT contain text or mixed content. 3865 3867 14.9. location XML Element 3869 Name: location 3871 Purpose: HTTP defines the "Location" header (see [RFC2616], Section 3872 14.30) for use with some status codes (such as 201 and the 300 3873 series codes). When these codes are used inside a 'multistatus' 3874 element, the 'location' element can be used to provide the 3875 accompanying Location header value. 3877 Description: Contains a single href element with the same value that 3878 would be used in a Location header. 3880 3882 14.10. lockentry XML Element 3884 Name: lockentry 3886 Purpose: Defines the types of locks that can be used with the 3887 resource. 3889 3891 14.11. lockinfo XML Element 3893 Name: lockinfo 3895 Purpose: The 'lockinfo' XML element is used with a LOCK method to 3896 specify the type of lock the client wishes to have created. 3898 3900 14.12. lockroot XML Element 3902 Name: lockroot 3904 Purpose: Contains the root URL of the lock, which is the URL through 3905 which the resource was addressed in the LOCK request. 3907 Description: The href element contains the root of the lock. The 3908 server SHOULD include this in all DAV:lockdiscovery property 3909 values and the response to LOCK requests. 3911 3913 14.13. lockscope XML Element 3915 Name: lockscope 3917 Purpose: Specifies whether a lock is an exclusive lock, or a shared 3918 lock. 3920 3922 14.14. locktoken XML Element 3924 Name: locktoken 3926 Purpose: The lock token associated with a lock. 3928 Description: The href contains a single lock token URI which refers 3929 to the lock. 3931 3933 14.15. locktype XML Element 3935 Name: locktype 3937 Purpose: Specifies the access type of a lock. At present, this 3938 specification only defines one lock type, the write lock. 3940 3942 14.16. multistatus XML Element 3944 Name: multistatus 3946 Purpose: Contains multiple response messages. 3948 Description: The 'responsedescription' element at the top level is 3949 used to provide a general message describing the overarching 3950 nature of the response. If this value is available an application 3951 may use it instead of presenting the individual response 3952 descriptions contained within the responses. 3954 3956 14.17. owner XML Element 3958 Name: owner 3960 Purpose: Provides information about the creator of a lock. 3962 Description: Allows a client to provide information sufficient for 3963 either directly contacting a principal (such as a telephone number 3964 or Email URI), or for discovering the principal (such as the URL 3965 of a homepage) who created a lock. The value provided MUST be 3966 treated as a dead property in terms of XML Information Item 3967 preservation. The server MUST NOT alter the value unless the 3968 owner value provided by the client is empty. For a certain amount 3969 of interoperability between different client implementations, if 3970 clients have URI-formatted contact information for the lock 3971 creator suitable for user display, then clients SHOULD put those 3972 URIs in 'href' child elements of the 'owner' element. 3974 Extensibility: MAY be extended with child elements, mixed content, 3975 text content or attributes. 3977 3979 14.18. prop XML element 3981 Name: prop 3983 Purpose: Contains properties related to a resource. 3985 Description: A generic container for properties defined on 3986 resources. All elements inside a 'prop' XML element MUST define 3987 properties related to the resource, although possible property 3988 names are in no way limited to those property names defined in 3989 this document or other standards. This element MUST NOT contain 3990 text or mixed content. 3992 3994 14.19. propertyupdate XML element 3996 Name: propertyupdate 3998 Purpose: Contains a request to alter the properties on a resource. 4000 Description: This XML element is a container for the information 4001 required to modify the properties on the resource. 4003 4005 14.20. propfind XML Element 4007 Name: propfind 4009 Purpose: Specifies the properties to be returned from a PROPFIND 4010 method. Four special elements are specified for use with 4011 'propfind': 'prop', 'allprop', 'include' and 'propname'. If 4012 'prop' is used inside 'propfind' it MUST NOT contain property 4013 values. 4015 4017 14.21. propname XML Element 4019 Name: propname 4021 Purpose: Specifies that only a list of property names on the 4022 resource is to be returned. 4024 4026 14.22. propstat XML Element 4028 Name: propstat 4029 Purpose: Groups together a prop and status element that is 4030 associated with a particular 'href' element. 4032 Description: The propstat XML element MUST contain one prop XML 4033 element and one status XML element. The contents of the prop XML 4034 element MUST only list the names of properties to which the result 4035 in the status element applies. The optional precondition/ 4036 postcondition element and 'responsedescription' text also apply to 4037 the properties named in 'prop'. 4039 4041 14.23. remove XML element 4043 Name: remove 4045 Purpose: Lists the properties to be removed from a resource. 4047 Description: Remove instructs that the properties specified in prop 4048 should be removed. Specifying the removal of a property that does 4049 not exist is not an error. All the XML elements in a 'prop' XML 4050 element inside of a 'remove' XML element MUST be empty, as only 4051 the names of properties to be removed are required. 4053 4055 14.24. response XML Element 4057 Name: response 4059 Purpose: Holds a single response describing the effect of a method 4060 on resource and/or its properties. 4062 Description: The 'href' element contains a HTTP URL pointing to a 4063 WebDAV resource when used in the 'response' container. A 4064 particular 'href' value MUST NOT appear more than once as the 4065 child of a 'response' XML element under a 'multistatus' XML 4066 element. This requirement is necessary in order to keep 4067 processing costs for a response to linear time. Essentially, this 4068 prevents having to search in order to group together all the 4069 responses by 'href'. There are, however, no requirements 4070 regarding ordering based on 'href' values. The optional 4071 precondition/postcondition element and 'responsedescription' text 4072 can provide additional information about this resource relative to 4073 the request or result. 4075 4078 14.25. responsedescription XML Element 4080 Name: responsedescription 4082 Purpose: Contains information about a status response within a 4083 Multi-Status. 4085 Description: Provides information suitable to be presented to a 4086 user. 4088 4090 14.26. set XML element 4092 Name: set 4094 Purpose: Lists the property values to be set for a resource. 4096 Description: The 'set' element MUST contain only a 'prop' element. 4097 The elements contained by the 'prop' element inside the 'set' 4098 element MUST specify the name and value of properties that are set 4099 on the resource identified by Request-URI. If a property already 4100 exists then its value is replaced. Language tagging information 4101 appearing in the scope of the 'prop' element (in the "xml:lang" 4102 attribute, if present) MUST be persistently stored along with the 4103 property, and MUST be subsequently retrievable using PROPFIND. 4105 4107 14.27. shared XML Element 4109 Name: shared 4111 Purpose: Specifies a shared lock. 4113 4115 14.28. status XML Element 4117 Name: status 4118 Purpose: Holds a single HTTP status-line. 4120 Value: status-line (defined in Section 6.1 of [RFC2616]) 4122 4124 14.29. timeout XML Element 4126 Name: timeout 4128 Purpose: The number of seconds remaining before a lock expires. 4130 Value: TimeType (defined in Section 10.7). 4132 4134 14.30. write XML Element 4136 Name: write 4138 Purpose: Specifies a write lock. 4140 4142 15. DAV Properties 4144 For DAV properties, the name of the property is also the same as the 4145 name of the XML element that contains its value. In the section 4146 below, the final line of each section gives the element type 4147 declaration using the format defined in [REC-XML]. The "Value" 4148 field, where present, specifies further restrictions on the allowable 4149 contents of the XML element using BNF (i.e., to further restrict the 4150 values of a PCDATA element). 4152 A protected property is one which cannot be changed with a PROPPATCH 4153 request. There may be other requests which would result in a change 4154 to a protected property (as when a LOCK request affects the value of 4155 DAV:lockdiscovery). Note that a given property could be protected on 4156 one type of resource, but not protected on another type of resource. 4158 A computed property is one with a value defined in terms of a 4159 computation (based on the content and other properties of that 4160 resource, or even of some other resource). A computed property is 4161 always a protected property. 4163 COPY and MOVE behavior refers to local COPY and MOVE operations. 4165 For properties defined based on HTTP GET response headers (DAV:get*), 4166 the value could include LWS as defined in [RFC2616], Section 4.2. 4167 Server implementors SHOULD NOT include extra LWS in these values, 4168 however client implementors MUST be prepared to handle extra LWS. 4170 15.1. creationdate Property 4172 Name: creationdate 4174 Purpose: Records the time and date the resource was created. 4176 Value: date-time (defined in [RFC3339], see the ABNF in section 4177 5.6.) 4179 Protected: MAY be protected. Some servers allow DAV:creationdate to 4180 be changed to reflect the time the document was created if that is 4181 more meaningful to the user (rather than the time it was 4182 uploaded). Thus, clients SHOULD NOT use this property in 4183 synchronization logic (use DAV:getetag instead). 4185 COPY/MOVE behaviour: This property value SHOULD be kept during a 4186 MOVE operation, but is normally re-initialized when a resource is 4187 created with a COPY. It should not be set in a COPY. 4189 Description: The DAV:creationdate property SHOULD be defined on all 4190 DAV compliant resources. If present, it contains a timestamp of 4191 the moment when the resource was created. Servers that are 4192 incapable of persistently recording the creation date SHOULD 4193 instead leave it undefined (i.e. report "Not Found"). 4195 4197 15.2. displayname Property 4199 Name: displayname 4201 Purpose: Provides a name for the resource that is suitable for 4202 presentation to a user. 4204 Value: Any text. 4206 Protected: SHOULD NOT be protected. Note that servers implementing 4207 [RFC2518] might have made this a protected property as this is a 4208 new requirement. 4210 COPY/MOVE behaviour: This property value SHOULD be preserved in COPY 4211 and MOVE operations. 4213 Description: Contains a description of the resource that is suitable 4214 for presentation to a user. This property is defined on the 4215 resource, and hence SHOULD have the same value independent of the 4216 Request-URI used to retrieve it (thus computing this property 4217 based on the Request-URI is deprecated). While generic clients 4218 might display the property value to end users, client UI designers 4219 must understand that the method for identifying resources is still 4220 the URL. Changes to DAV:displayname do not issue moves or copies 4221 to the server, but simply change a piece of meta-data on the 4222 individual resource. Two resources can have the same DAV: 4223 displayname value even within the same collection. 4225 4227 15.3. getcontentlanguage Property 4229 Name: getcontentlanguage 4231 Purpose: Contains the Content-Language header value (from Section 4232 14.12 of [RFC2616]) as it would be returned by a GET without 4233 accept headers. 4235 Value: language-tag (language-tag is defined in Section 3.10 of 4236 [RFC2616]). 4238 Protected: SHOULD NOT be protected, so that clients can reset the 4239 language. Note that servers implementing [RFC2518] might have 4240 made this a protected property as this is a new requirement. 4242 COPY/MOVE behaviour: This property value SHOULD be preserved in COPY 4243 and MOVE operations. 4245 Description: The DAV:getcontentlanguage property MUST be defined on 4246 any DAV compliant resource that returns the Content-Language 4247 header on a GET. 4249 4251 15.4. getcontentlength Property 4253 Name: getcontentlength 4255 Purpose: Contains the Content-Length header returned by a GET 4256 without accept headers. 4258 Value: See Section 14.13 of [RFC2616]. 4260 Protected: This property is computed, therefore protected. 4262 Description: The DAV:getcontentlength property MUST be defined on 4263 any DAV compliant resource that returns the Content-Length header 4264 in response to a GET. 4266 COPY/MOVE behaviour: This property value is dependent on the size of 4267 the destination resource, not the value of the property on the 4268 source resource. 4270 4272 15.5. getcontenttype Property 4274 Name: getcontenttype 4276 Purpose: Contains the Content-Type header value (from Section 14.17 4277 of [RFC2616]) as it would be returned by a GET without accept 4278 headers. 4280 Value: media-type (defined in Section 3.7 of [RFC2616]) 4282 Protected: Potentially protected if the server prefers to assign 4283 content types on its own (see also discussion in Section 9.7.1). 4285 COPY/MOVE behaviour: This property value SHOULD be preserved in COPY 4286 and MOVE operations. 4288 Description: This property MUST be defined on any DAV compliant 4289 resource that returns the Content-Type header in response to a 4290 GET. 4292 4294 15.6. getetag Property 4296 Name: getetag 4298 Purpose: Contains the ETag header value (from Section 14.19 of 4299 [RFC2616]) as it would be returned by a GET without accept 4300 headers. 4302 Value: entity-tag (defined in Section 3.11 of [RFC2616]) 4304 Protected: MUST be protected because this value is created and 4305 controlled by the server. 4307 COPY/MOVE behaviour: This property value is dependent on the final 4308 state of the destination resource, not the value of the property 4309 on the source resource. Also note the considerations in 4310 Section 8.8. 4312 Description: The getetag property MUST be defined on any DAV 4313 compliant resource that returns the Etag header. Refer to Section 4314 3.11 of RFC2616 for a complete definition of the semantics of an 4315 ETag, and to Section 8.6 for a discussion of ETags in WebDAV. 4317 4319 15.7. getlastmodified Property 4321 Name: getlastmodified 4323 Purpose: Contains the Last-Modified header value (from Section 14.29 4324 of [RFC2616]) as it would be returned by a GET method without 4325 accept headers. 4327 Value: rfc1123-date (defined in Section 3.3.1 of [RFC2616]) 4329 Protected: SHOULD be protected because some clients may rely on the 4330 value for appropriate caching behavior, or on the value of the 4331 Last-Modified header to which this property is linked. 4333 COPY/MOVE behaviour: This property value is dependent on the last 4334 modified date of the destination resource, not the value of the 4335 property on the source resource. Note that some server 4336 implementations use the file system date modified value for the 4337 DAV:getlastmodified value, and this can be preserved in a MOVE 4338 even when the HTTP Last-Modified value SHOULD change. Note that 4339 since [RFC2616] requires clients to use ETags where provided, a 4340 server implementing ETags can count on clients using a much better 4341 mechanism than modification dates for offline synchronization or 4342 cache control. Also note the considerations in Section 8.8. 4344 Description: Note that the last-modified date on a resource SHOULD 4345 only reflect changes in the body (the GET responses) of the 4346 resource. A change in a property only SHOULD NOT cause the last- 4347 modified date to change, because clients MAY rely on the last- 4348 modified date to know when to overwrite the existing body. The 4349 DAV:getlastmodified property MUST be defined on any DAV compliant 4350 resource that returns the Last-Modified header in response to a 4351 GET. 4353 4355 15.8. lockdiscovery Property 4357 Name: lockdiscovery 4359 Purpose: Describes the active locks on a resource 4361 Protected: MUST be protected. Clients change the list of locks 4362 through LOCK and UNLOCK, not through PROPPATCH. 4364 COPY/MOVE behaviour: The value of this property depends on the lock 4365 state of the destination, not on the locks of the source resource. 4366 Recall that locks are not moved in a MOVE operation. 4368 Description: Returns a listing of who has a lock, what type of lock 4369 he has, the timeout type and the time remaining on the timeout, 4370 and the associated lock token. If there are no locks, but the 4371 server supports locks, the property will be present but contain 4372 zero 'activelock' elements. If there is one or more lock, an 4373 'activelock' element appears for each lock on the resource. This 4374 property is NOT lockable with respect to write locks (Section 7). 4376 4378 15.8.1. Example - Retrieving DAV:lockdiscovery 4380 >>Request 4382 PROPFIND /container/ HTTP/1.1 4383 Host: www.example.com 4384 Content-Length: xxxx 4385 Content-Type: application/xml; charset="utf-8" 4387 4388 4389 4390 4392 >>Response 4394 HTTP/1.1 207 Multi-Status 4395 Content-Type: application/xml; charset="utf-8" 4396 Content-Length: xxxx 4398 4399 4400 4401 http://www.example.com/container/ 4402 4403 4404 4405 4406 4407 4408 0 4409 Jane Smith 4410 Infinite 4411 4412 urn:uuid:f81de2ad-7f3d-a1b2-4f3c-00a0c91a9d76 4414 4415 4416 http://www.example.com/container/ 4417 4418 4419 4420 4421 HTTP/1.1 200 OK 4422 4423 4424 4426 This resource has a single exclusive write lock on it, with an 4427 infinite timeout. 4429 15.9. resourcetype Property 4431 Name: resourcetype 4433 Purpose: Specifies the nature of the resource. 4435 Protected: SHOULD be protected. Resource type is generally decided 4436 through the operation creating the resource (MKCOL vs PUT), not by 4437 PROPPATCH. 4439 COPY/MOVE behaviour: Generally a COPY/MOVE of a resource results in 4440 the same type of resource at the destination. 4442 Description: MUST be defined on all DAV compliant resources. Each 4443 child element identifies a specific type the resource belongs to, 4444 such as 'collection', which is the only resource type defined by 4445 this specification (see Section 14.3). If the element contains 4446 the 'collection' child element plus additional unrecognized 4447 elements, it should generally be treated as a collection. If the 4448 element contains no recognized child elements, it should be 4449 treated as a non-collection resource. The default value is empty. 4450 This element MUST NOT contain text or mixed content. Any custom 4451 child element is considered to be an identifier for a resource 4452 type. 4454 Example: (fictional example to show extensibility) 4456 4457 4458 4459 4461 15.10. supportedlock Property 4463 Name: supportedlock 4465 Purpose: To provide a listing of the lock capabilities supported by 4466 the resource. 4468 Protected: MUST be protected. Servers determine what lock 4469 mechanisms are supported, not clients. 4471 COPY/MOVE behaviour: This property value is dependent on the kind of 4472 locks supported at the destination, not on the value of the 4473 property at the source resource. Servers attempting to COPY to a 4474 destination should not attempt to set this property at the 4475 destination. 4477 Description: Returns a listing of the combinations of scope and 4478 access types which may be specified in a lock request on the 4479 resource. Note that the actual contents are themselves controlled 4480 by access controls so a server is not required to provide 4481 information the client is not authorized to see. This property is 4482 NOT lockable with respect to write locks (Section 7). 4484 4486 15.10.1. Example - Retrieving DAV:supportedlock 4488 >>Request 4490 PROPFIND /container/ HTTP/1.1 4491 Host: www.example.com 4492 Content-Length: xxxx 4493 Content-Type: application/xml; charset="utf-8" 4495 4496 4497 4498 4500 >>Response 4502 HTTP/1.1 207 Multi-Status 4503 Content-Type: application/xml; charset="utf-8" 4504 Content-Length: xxxx 4506 4507 4508 4509 http://www.example.com/container/ 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 HTTP/1.1 200 OK 4524 4525 4526 4528 16. Precondition/postcondition XML elements 4530 As introduced in Section 8.7, extra information on error conditions 4531 can be included in the body of many status responses. This section 4532 makes requirements on the use of the error body mechanism and 4533 introduces a number of precondition and postcondition codes. 4535 A "precondition" of a method describes the state of the server that 4536 must be true for that method to be performed. A "postcondition" of a 4537 method describes the state of the server that must be true after that 4538 method has been completed. 4540 Each precondition and postcondition has a unique XML element 4541 associated with it. In a 207 Multi-Status response, the XML element 4542 MUST appear inside an 'error' element in the appropriate 'propstat or 4543 'response' element depending on whether the condition applies to one 4544 or more properties or to the resource as a whole. In all other error 4545 responses, the XML element MUST be returned as the child of a top- 4546 level 'error' element in the response body, unless otherwise 4547 negotiated by the request, along with an appropriate response status. 4548 The most common response status codes are 403 (Forbidden) if the 4549 request should not be repeated because it will always fail, and 409 4550 (Conflict) if it is expected that the user might be able to resolve 4551 the conflict and resubmit the request. The 'error' element MAY 4552 contain child elements with specific error information and MAY be 4553 extended with any custom child elements. 4555 This mechanism does not take the place of using a correct numeric 4556 status code as defined here or in HTTP, because the client MUST 4557 always be able to take a reasonable course of action based only on 4558 the numeric code. However, it does remove the need to define new 4559 numeric codes. The new machine-readable codes used for this purpose 4560 are XML elements classified as preconditions and postconditions, so 4561 naturally any group defining a new condition code can use their own 4562 namespace. As always, the "DAV:" namespace is reserved for use by 4563 IETF-chartered WebDAV working groups. 4565 A server supporting this specification SHOULD use the XML error 4566 whenever a precondition or postcondition defined in this document is 4567 violated. For error conditions not specified in this document, the 4568 server MAY simply choose an appropriate numeric status and leave the 4569 response body blank. However, a server MAY instead use a custom 4570 condition code and other supporting text, because even when clients 4571 do not automatically recognize condition codes they can be quite 4572 useful in interoperability testing and debugging. 4574 Example - Response with precondition code 4575 >>Response 4577 HTTP/1.1 423 Locked 4578 Content-Type: application/xml; charset="utf-8" 4579 Content-Length: xxxx 4581 4582 4583 4584 /workspace/webdav/ 4585 4586 4588 In this example, a client unaware of a "Depth: infinity" lock on the 4589 parent collection "/workspace/webdav/" attempted to modify the 4590 collection member "/workspace/webdav/proposal.doc". 4592 Some other useful preconditions and postconditions have been defined 4593 in other specifications extending WebDAV, such as [RFC3744] (see 4594 particularly Section 7.1.1), [RFC3253], and [RFC3648]. 4596 All these elements are in the "DAV:" namespace. If not specified 4597 otherwise, the content for each condition's XML element is defined to 4598 be empty. 4600 Name: lock-token-matches-request-uri 4602 Use with: 409 Conflict 4604 Purpose: (precondition) -- A request may include a Lock-Token header 4605 to identify a lock for the UNLOCK method. However, if the 4606 Request-URI does not fall within the scope of the lock identified 4607 by the token, the server SHOULD use this error. The lock may have 4608 a scope that does not include the Request-URI, or the lock could 4609 have disappeared, or the token may be invalid. 4611 Name: lock-token-submitted (precondition) 4613 Use with: 423 Locked 4615 Purpose: The request could not succeed because a lock token should 4616 have been submitted. This element, if present, MUST contain at 4617 least one URL of a locked resource that prevented the request. In 4618 cases of MOVE, COPY and DELETE where collection locks are 4619 involved, it can be difficult for the client to find out which 4620 locked resource made the request fail -- but the server is only 4621 resonsible for returning one such locked resource. The server MAY 4622 return every locked resource that prevented the request from 4623 succeeding if it knows them all. 4625 4627 Name: no-conflicting-lock (precondition) 4629 Use with: Typically 423 Locked 4631 Purpose: A LOCK request failed due the presence of an already 4632 existing conflicting lock. Note that a lock can be in conflict 4633 although the resource to which the request was directed is only 4634 indirectly locked. In this case, the precondition code can be 4635 used to inform the client about the resource which is the root of 4636 the conflicting lock, avoiding a separate lookup of the 4637 "lockdiscovery" property. 4639 4641 Name: no-external-entities 4643 Use with: 403 Forbidden 4645 Purpose: (precondition) -- If the server rejects a client request 4646 because the request body contains an external entity, the server 4647 SHOULD use this error. 4649 Name: preserved-live-properties 4651 Use with: 409 Conflict 4653 Purpose: (postcondition) -- The server received an otherwise-valid 4654 MOVE or COPY request, but cannot maintain the live properties with 4655 the same behavior at the destination. It may be that the server 4656 only supports some live properties in some parts of the 4657 repository, or simply has an internal error. 4659 Name: propfind-finite-depth 4661 Use with: 403 Forbidden 4663 Purpose: (precondition) -- This server does not allow infinite-depth 4664 PROPFIND requests on collections. 4666 Name: cannot-modify-protected-property 4667 Use with: 403 Forbidden 4669 Purpose: (precondition) -- The client attempted to set a protected 4670 property in a PROPPATCH (such as DAV:getetag). See also 4671 [RFC3253], Section 3.12. 4673 17. XML Extensibility in DAV 4675 The XML namespace extension ([REC-XML-NAMES]) is used in this 4676 specification in order to allow for new XML elements to be added 4677 without fear of colliding with other element names. Although WebDAV 4678 request and response bodies can be extended by arbitrary XML 4679 elements, which can be ignored by the message recipient, an XML 4680 element in the "DAV:" namespace SHOULD NOT be used in the request or 4681 response body unless that XML element is explicitly defined in an 4682 IETF RFC reviewed by a WebDAV working group. 4684 For WebDAV to be both extensibile and backwards-compatible, both 4685 clients and servers need to know how to behave when unexpected or 4686 unrecognized command extensions are received. For XML processing, 4687 this means that clients and servers MUST process received XML 4688 documents as if unexpected elements and attributes (and all children 4689 of unrecognized elements) were not there. An unexpected element or 4690 attribute includes one which may be used in another context but is 4691 not expected here. Ignoring such items for purposes of processing 4692 can of course be consistent with logging all information or 4693 presenting for debugging. 4695 This restriction also applies to the processing, by clients, of DAV 4696 property values where unexpected XML elements SHOULD be ignored 4697 unless the property's schema declares otherwise. 4699 This restriction does not apply to setting dead DAV properties on the 4700 server where the server MUST record all XML elements. 4702 Additionally, this restriction does not apply to the use of XML where 4703 XML happens to be the content type of the entity body, for example, 4704 when used as the body of a PUT. 4706 Processing instructions in XML SHOULD be ignored by recipients. 4707 Thus, specifications extending WebDAV SHOULD NOT use processing 4708 instructions to define normative behavior. 4710 XML DTD fragments are included for all the XML elements defined in 4711 this specification. However, correct XML will not be valid according 4712 to any DTD due to namespace usage and extension rules. In 4713 particular: 4715 o Elements (from this specification) are in the "DAV:" namespace, 4717 o Element ordering is irrelevant unless otherwise stated, 4719 o Extension attributes MAY be added, 4720 o For element type definitions of "ANY", the normative text 4721 definition for that element defines what can be in it and what 4722 that means. 4724 o For element type definitions of "#PCDATA", extension elements MUST 4725 NOT be added. 4727 o For other element type definitions, including "EMPTY", extension 4728 elements MAY be added. 4730 Note that this means that elements containing elements cannot be 4731 extended to contain text, and vice versa. 4733 With DTD validation relaxed by the rules above, the constraints 4734 described by the DTD fragments are normative (see for example 4735 Appendix A). A recipient of a WebDAV message with an XML body MUST 4736 NOT validate the XML document according to any hard-coded or 4737 dynamically-declared DTD. 4739 Note that this section describes backwards-compatible extensibility 4740 rules. There might also be times when an extension is designed not 4741 to be backwards-compatible, for example defining an extension that 4742 reuses an XML element defined in this document but omitting one of 4743 the child elements required by the DTDs in this specification. 4745 18. DAV Compliance Classes 4747 A DAV compliant resource can advertise several classes of compliance. 4748 A client can discover the compliance classes of a resource by 4749 executing OPTIONS on the resource, and examining the "DAV" header 4750 which is returned. Note particularly that resources are spoken of as 4751 being compliant, rather than servers. That is because theoretically 4752 some resources on a server could support different feature sets. 4753 E.g. a server could have a sub-repository where an advanced feature 4754 like versioning was supported, even if that feature was not supported 4755 on all sub-repositories. 4757 Since this document describes extensions to the HTTP/1.1 protocol, 4758 minimally all DAV compliant resources, clients, and proxies MUST be 4759 compliant with [RFC2616]. 4761 A resource that is class 2 or class 3 compliant must also be class 1 4762 compliant. 4764 18.1. Class 1 4766 A class 1 compliant resource MUST meet all "MUST" requirements in all 4767 sections of this document. 4769 Class 1 compliant resources MUST return, at minimum, the value "1" in 4770 the DAV header on all responses to the OPTIONS method. 4772 18.2. Class 2 4774 A class 2 compliant resource MUST meet all class 1 requirements and 4775 support the LOCK method, the DAV:supportedlock property, the DAV: 4776 lockdiscovery property, the Time-Out response header and the Lock- 4777 Token request header. A class "2" compliant resource SHOULD also 4778 support the Time-Out request header and the 'owner' XML element. 4780 Class 2 compliant resources MUST return, at minimum, the values "1" 4781 and "2" in the DAV header on all responses to the OPTIONS method. 4783 18.3. Class 3 4785 A resource can explicitly advertise its support for the revisions to 4786 [RFC2518] made in this document. Class 1 MUST be supported as well. 4787 Class 2 MAY be supported. Advertising class 3 support in addition to 4788 class 1 and 2 means that the server supports all the requirements in 4789 this specification. Advertising class 3 and class 1 support, but not 4790 class 2, means that the server supports all the requirements in this 4791 specification except possibly those that involve locking support. 4793 Example: 4795 DAV: 1, 3 4797 19. Internationalization Considerations 4799 In the realm of internationalization, this specification complies 4800 with the IETF Character Set Policy [RFC2277]. In this specification, 4801 human-readable fields can be found either in the value of a property, 4802 or in an error message returned in a response entity body. In both 4803 cases, the human-readable content is encoded using XML, which has 4804 explicit provisions for character set tagging and encoding, and 4805 requires that XML processors read XML elements encoded, at minimum, 4806 using the UTF-8 [RFC3629] and UTF-16 encodings of the ISO 10646 4807 multilingual plane. XML examples in this specification demonstrate 4808 use of the charset parameter of the Content-Type header, as defined 4809 in [RFC3023], as well as the XML declarations which provide charset 4810 identification information for MIME and XML processors. 4812 XML also provides a language tagging capability for specifying the 4813 language of the contents of a particular XML element. The "xml:lang" 4814 attribute appears on an XML element to identify the language of its 4815 content and attributes. See [REC-XML] for definitions of values and 4816 scoping. 4818 WebDAV applications MUST support the character set tagging, character 4819 set encoding, and the language tagging functionality of the XML 4820 specification. Implementors of WebDAV applications are strongly 4821 encouraged to read "XML Media Types" [RFC3023] for instruction on 4822 which MIME media type to use for XML transport, and on use of the 4823 charset parameter of the Content-Type header. 4825 Names used within this specification fall into four categories: names 4826 of protocol elements such as methods and headers, names of XML 4827 elements, names of properties, and names of conditions. Naming of 4828 protocol elements follows the precedent of HTTP, using English names 4829 encoded in USASCII for methods and headers. Since these protocol 4830 elements are not visible to users, and are simply long token 4831 identifiers, they do not need to support multiple languages. 4832 Similarly, the names of XML elements used in this specification are 4833 not visible to the user and hence do not need to support multiple 4834 languages. 4836 WebDAV property names are qualified XML names (pairs of XML namespace 4837 name and local name). Although some applications (e.g., a generic 4838 property viewer) will display property names directly to their users, 4839 it is expected that the typical application will use a fixed set of 4840 properties, and will provide a mapping from the property name and 4841 namespace to a human-readable field when displaying the property name 4842 to a user. It is only in the case where the set of properties is not 4843 known ahead of time that an application need display a property name 4844 to a user. We recommend that applications provide human-readable 4845 property names wherever feasible. 4847 For error reporting, we follow the convention of HTTP/1.1 status 4848 codes, including with each status code a short, English description 4849 of the code (e.g., 423 (Locked)). While the possibility exists that 4850 a poorly crafted user agent would display this message to a user, 4851 internationalized applications will ignore this message, and display 4852 an appropriate message in the user's language and character set. 4854 Since interoperation of clients and servers does not require locale 4855 information, this specification does not specify any mechanism for 4856 transmission of this information. 4858 20. Security Considerations 4860 This section is provided to detail issues concerning security 4861 implications of which WebDAV applications need to be aware. 4863 All of the security considerations of HTTP/1.1 (discussed in 4864 [RFC2616]) and XML (discussed in [RFC3023]) also apply to WebDAV. In 4865 addition, the security risks inherent in remote authoring require 4866 stronger authentication technology, introduce several new privacy 4867 concerns, and may increase the hazards from poor server design. 4868 These issues are detailed below. 4870 20.1. Authentication of Clients 4872 Due to their emphasis on authoring, WebDAV servers need to use 4873 authentication technology to protect not just access to a network 4874 resource, but the integrity of the resource as well. Furthermore, 4875 the introduction of locking functionality requires support for 4876 authentication. 4878 A password sent in the clear over an insecure channel is an 4879 inadequate means for protecting the accessibility and integrity of a 4880 resource as the password may be intercepted. Since Basic 4881 authentication for HTTP/1.1 performs essentially clear text 4882 transmission of a password, Basic authentication MUST NOT be used to 4883 authenticate a WebDAV client to a server unless the connection is 4884 secure. Furthermore, a WebDAV server MUST NOT send Basic 4885 authentication credentials in a WWW-Authenticate header unless the 4886 connection is secure. Examples of secure connections include a 4887 Transport Layer Security (TLS) connection employing a strong cipher 4888 suite with mutual authentication of client and server, or a 4889 connection over a network which is physically secure, for example, an 4890 isolated network in a building with restricted access. 4892 WebDAV applications MUST support the Digest authentication scheme 4893 [RFC2617]. Since Digest authentication verifies that both parties to 4894 a communication know a shared secret, a password, without having to 4895 send that secret in the clear, Digest authentication avoids the 4896 security problems inherent in Basic authentication while providing a 4897 level of authentication which is useful in a wide range of scenarios. 4899 20.2. Denial of Service 4901 Denial of service attacks are of special concern to WebDAV servers. 4902 WebDAV plus HTTP enables denial of service attacks on every part of a 4903 system's resources. 4905 o The underlying storage can be attacked by PUTting extremely large 4906 files. 4908 o Asking for recursive operations on large collections can attack 4909 processing time. 4911 o Making multiple pipelined requests on multiple connections can 4912 attack network connections. 4914 WebDAV servers need to be aware of the possibility of a denial of 4915 service attack at all levels. The proper response to such an attack 4916 MAY be to simply drop the connection, or if the server is able to 4917 make a response, the server MAY use a 400-level status request such 4918 as 400 (Bad Request) and indicate why the request was refused (a 500- 4919 level status response would indicate that the problem is with the 4920 server, whereas unintentional DOS attacks are something the client is 4921 capable of remedying). 4923 20.3. Security through Obscurity 4925 WebDAV provides, through the PROPFIND method, a mechanism for listing 4926 the member resources of a collection. This greatly diminishes the 4927 effectiveness of security or privacy techniques that rely only on the 4928 difficulty of discovering the names of network resources. Users of 4929 WebDAV servers are encouraged to use access control techniques to 4930 prevent unwanted access to resources, rather than depending on the 4931 relative obscurity of their resource names. 4933 20.4. Privacy Issues Connected to Locks 4935 When submitting a lock request a user agent may also submit an 4936 'owner' XML field giving contact information for the person taking 4937 out the lock (for those cases where a person, rather than a robot, is 4938 taking out the lock). This contact information is stored in a DAV: 4939 lockdiscovery property on the resource, and can be used by other 4940 collaborators to begin negotiation over access to the resource. 4941 However, in many cases this contact information can be very private, 4942 and should not be widely disseminated. Servers SHOULD limit read 4943 access to the DAV:lockdiscovery property as appropriate. 4944 Furthermore, user agents SHOULD provide control over whether contact 4945 information is sent at all, and if contact information is sent, 4946 control over exactly what information is sent. 4948 20.5. Privacy Issues Connected to Properties 4950 Since property values are typically used to hold information such as 4951 the author of a document, there is the possibility that privacy 4952 concerns could arise stemming from widespread access to a resource's 4953 property data. To reduce the risk of inadvertent release of private 4954 information via properties, servers are encouraged to develop access 4955 control mechanisms that separate read access to the resource body and 4956 read access to the resource's properties. This allows a user to 4957 control the dissemination of their property data without overly 4958 restricting access to the resource's contents. 4960 20.6. Implications of XML Entities 4962 XML supports a facility known as "external entities", defined in 4963 Section 4.2.2 of [REC-XML], which instruct an XML processor to 4964 retrieve and include additional XML. An external XML entity can be 4965 used to append or modify the document type declaration (DTD) 4966 associated with an XML document. An external XML entity can also be 4967 used to include XML within the content of an XML document. For non- 4968 validating XML, such as the XML used in this specification, including 4969 an external XML entity is not required by XML. However, XML does 4970 state that an XML processor may, at its discretion, include the 4971 external XML entity. 4973 External XML entities have no inherent trustworthiness and are 4974 subject to all the attacks that are endemic to any HTTP GET request. 4975 Furthermore, it is possible for an external XML entity to modify the 4976 DTD, and hence affect the final form of an XML document, in the worst 4977 case significantly modifying its semantics, or exposing the XML 4978 processor to the security risks discussed in [RFC3023]. Therefore, 4979 implementers must be aware that external XML entities should be 4980 treated as untrustworthy. If a server implementor chooses not to 4981 handle external XML entities, it SHOULD respond to requests 4982 containing external entities with the 'no-external-entities' 4983 condition code. 4985 There is also the scalability risk that would accompany a widely 4986 deployed application which made use of external XML entities. In 4987 this situation, it is possible that there would be significant 4988 numbers of requests for one external XML entity, potentially 4989 overloading any server which fields requests for the resource 4990 containing the external XML entity. 4992 Furthermore, there's also a risk based on the evaluation of "internal 4993 entities" as defined in Section 4.2.2 of [REC-XML]. A small, 4994 carefully crafted request using nested internal entities may require 4995 enormous amounts of memory and/or processing time to process. Server 4996 implementors should be aware of this risk and configure their XML 4997 parsers so that requests like these can be detected and rejected as 4998 early as possible. 5000 20.7. Risks Connected with Lock Tokens 5002 This specification encourages the use of "A Universally Unique 5003 Identifier (UUID) URN Namespace" ([RFC4122]) for lock tokens 5004 (Section 6.5), in order to guarantee their uniqueness across space 5005 and time. Version 1 UUIDs (defined in Section 4) MAY contain a 5006 "node" field that "consists of an IEEE 802 MAC address, usually the 5007 host address. For systems with multiple IEEE addresses, any 5008 available one can be used". Since a WebDAV server will issue many 5009 locks over its lifetime, the implication is that it may also be 5010 publicly exposing its IEEE 802 address. 5012 There are several risks associated with exposure of IEEE 802 5013 addresses. Using the IEEE 802 address: 5015 o It is possible to track the movement of hardware from subnet to 5016 subnet. 5018 o It may be possible to identify the manufacturer of the hardware 5019 running a WebDAV server. 5021 o It may be possible to determine the number of each type of 5022 computer running WebDAV. 5024 This risk only applies to host address based UUID versions. Section 5025 4 of [RFC4122] describes several other mechanisms for generating 5026 UUIDs that do not involve the host address and therefore do not 5027 suffer from this risk. 5029 20.8. Hosting Malicious Content 5031 HTTP has the ability to host programs which are executed on client 5032 machines. These programs can take many forms including web scripts, 5033 executables, plug in modules, and macros in documents. WebDAV does 5034 not change any of the security concerns around these programs yet 5035 often WebDAV is used in contexts where a wide range of users can 5036 publish documents on a server. The server might not have a close 5037 trust relationship with the author that is publishing the document. 5038 Servers that allow clients to publish arbitrary content can usefully 5039 implement precautions to check that content published to the server 5040 is not harmful to other clients. Servers could do this by techniques 5041 such as restricting the types of content that is allowed to be 5042 published and running virus and malware detection software on 5043 published content. Servers can also mitigate the risk by having 5044 appropriate access restriction and authentication of users that are 5045 allowed to publish content to the server. 5047 21. IANA Considerations 5049 21.1. New URI Schemes 5051 This specification defines two URI schemes: 5053 1. the "opaquelocktoken" scheme defined in Appendix C, and 5055 2. the "DAV" URI scheme, which historically was used in [RFC2518] to 5056 disambiguate WebDAV property and XML element names and which 5057 continues to be used for that purpose in this specification and 5058 others extending WebDAV. Creation of identifiers in the "DAV:" 5059 namespace is controlled by the IETF. 5061 Note that defining new URI schemes for XML namespaces is now 5062 discouraged. "DAV:" was defined before standard best practices 5063 emerged. 5065 21.2. XML Namespaces 5067 XML namespaces disambiguate WebDAV property names and XML elements. 5068 Any WebDAV user or application can define a new namespace in order to 5069 create custom properties or extend WebDAV XML syntax. IANA does not 5070 need to manage such namespaces, property names or element names. 5072 21.3. Message Header Fields 5074 The message header fields below should be added to the permanent 5075 registry (see [RFC3864]). 5077 21.3.1. DAV 5079 Header field name: DAV 5081 Applicable protocol: http 5083 Status: standard 5085 Author/Change controller: IETF 5087 Specification document: this specification (Section 10.1) 5089 21.3.2. Depth 5091 Header field name: Depth 5093 Applicable protocol: http 5094 Status: standard 5096 Author/Change controller: IETF 5098 Specification document: this specification (Section 10.2) 5100 21.3.3. Destination 5102 Header field name: Destination 5104 Applicable protocol: http 5106 Status: standard 5108 Author/Change controller: IETF 5110 Specification document: this specification (Section 10.3) 5112 21.3.4. If 5114 Header field name: If 5116 Applicable protocol: http 5118 Status: standard 5120 Author/Change controller: IETF 5122 Specification document: this specification (Section 10.4) 5124 21.3.5. Lock-Token 5126 Header field name: Lock-Token 5128 Applicable protocol: http 5130 Status: standard 5132 Author/Change controller: IETF 5134 Specification document: this specification (Section 10.5) 5136 21.3.6. Overwrite 5138 Header field name: Overwrite 5140 Applicable protocol: http 5141 Status: standard 5143 Author/Change controller: IETF 5145 Specification document: this specification (Section 10.6) 5147 21.3.7. Timeout 5149 Header field name: Timeout 5151 Applicable protocol: http 5153 Status: standard 5155 Author/Change controller: IETF 5157 Specification document: this specification (Section 10.7) 5159 22. Acknowledgements 5161 A specification such as this thrives on piercing critical review and 5162 withers from apathetic neglect. The authors gratefully acknowledge 5163 the contributions of the following people, whose insights were so 5164 valuable at every stage of our work. 5166 Contributors to RFC2518 5168 Terry Allen, Harald Alvestrand, Jim Amsden, Becky Anderson, Alan 5169 Babich, Sanford Barr, Dylan Barrell, Bernard Chester, Tim Berners- 5170 Lee, Dan Connolly, Jim Cunningham, Ron Daniel, Jr., Jim Davis, Keith 5171 Dawson, Mark Day, Brian Deen, Martin Duerst, David Durand, Lee 5172 Farrell, Chuck Fay, Wesley Felter, Roy Fielding, Mark Fisher, Alan 5173 Freier, George Florentine, Jim Gettys, Phill Hallam-Baker, Dennis 5174 Hamilton, Steve Henning, Mead Himelstein, Alex Hopmann, Andre van der 5175 Hoek, Ben Laurie, Paul Leach, Ora Lassila, Karen MacArthur, Steven 5176 Martin, Larry Masinter, Michael Mealling, Keith Moore, Thomas Narten, 5177 Henrik Nielsen, Kenji Ota, Bob Parker, Glenn Peterson, Jon Radoff, 5178 Saveen Reddy, Henry Sanders, Christopher Seiwald, Judith Slein, Mike 5179 Spreitzer, Einar Stefferud, Greg Stein, Ralph Swick, Kenji Takahashi, 5180 Richard N. Taylor, Robert Thau, John Turner, Sankar Virdhagriswaran, 5181 Fabio Vitali, Gregory Woodhouse, and Lauren Wood. 5183 Two from this list deserve special mention. The contributions by 5184 Larry Masinter have been invaluable, both in helping the formation of 5185 the working group and in patiently coaching the authors along the 5186 way. In so many ways he has set high standards we have toiled to 5187 meet. The contributions of Judith Slein in clarifying the 5188 requirements, and in patiently reviewing draft after draft, both 5189 improved this specification and expanded our minds on document 5190 management. 5192 We would also like to thank John Turner for developing the XML DTD. 5194 The authors of RFC2518 were Yaron Goland, Jim Whitehead, A. Faizi, 5195 Steve Carter and D. Jensen. Although their names had to be removed 5196 due to IETF author count restrictions they can take credit for the 5197 majority of the design of WebDAV. 5199 Additional Acknowledgements for This Specification 5201 Significant contributors of text for this specification are listed as 5202 contributors in the section below. We must also gratefully 5203 acknowledge Geoff Clemm, Joel Soderberg, and Dan Brotsky for hashing 5204 out specific text on the list or in meetings. Joe Hildebrand and 5205 Cullen Jennings helped close many issues. Barry Lind described an 5206 additional security consideration and Cullen Jennings provided text 5207 for that consideration. Jason Crawford tracked issue status for this 5208 document for a period of years, followed by Elias Sinderson. 5210 23. Contributors to This Specification 5212 Julian Reschke, 5213 bytes GmbH, 5214 Hafenweg 16, 48155 Muenster, Germany, 5215 Email: julian.reschke@greenbytes.de 5217 Elias Sinderson 5218 University of California, Santa Cruz 5219 1156 High Street, Santa Cruz, CA 95064 5220 Email: elias@cse.ucsc.edu 5222 Jim Whitehead, 5223 University of California, Santa Cruz 5224 1156 High Street, Santa Cruz, CA 95064 5225 Email: ejw@soe.ucsc.edu 5227 24. Authors of RFC2518 5229 Y. Y. Goland, 5230 Microsoft Corporation, 5231 One Microsoft Way, 5232 Redmond, WA 98052-6399. 5233 Email: yarong@microsoft.com. 5235 E. J. Whitehead, Jr., 5236 Dept. Of Information and Computer Science, 5237 University of California, Irvine, 5238 Irvine, CA 92697-3425. 5239 Email: ejw@ics.uci.edu. 5241 A. Faizi, 5242 Netscape, 5243 685 East Middlefield Road, 5244 Mountain View, CA 94043. 5245 Email: asad@netscape.com. 5247 S. R. Carter, 5248 Novell, 5249 1555 N. Technology Way, 5250 M/S ORM F111, 5251 Orem, UT 84097-2399. 5252 Email: srcarter@novell.com. 5254 D. Jensen, 5255 Novell, 5256 1555 N. Technology Way, 5257 M/S ORM F111, 5258 Orem, UT 84097-2399. 5259 Email: dcjensen@novell.com. 5261 25. References 5263 25.1. Normative References 5265 [REC-XML] Bray, T., Paoli, J., Sperberg-McQueen, C., Maler, E., and 5266 F. Yergeau, "Extensible Markup Language (XML) 1.0 (Third 5267 Edition)", W3C REC-xml-20040204, February 2004, 5268 . 5270 [REC-XML-INFOSET] 5271 Cowan, J. and R. Tobin, "XML Information Set (Second 5272 Edition)", W3C REC-xml-infoset-20040204, February 2004, 5273 . 5275 [REC-XML-NAMES] 5276 Bray, T., Hollander, D., and A. Layman, "Namespaces in 5277 XML", W3C REC-xml-names-19990114, January 1999, 5278 . 5280 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 5281 Requirement Levels", BCP 14, RFC 2119, March 1997. 5283 [RFC2277] Alvestrand, H., "IETF Policy on Character Sets and 5284 Languages", BCP 18, RFC 2277, January 1998. 5286 [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., 5287 Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext 5288 Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. 5290 [RFC2617] Franks, J., Hallam-Baker, P., Hostetler, J., Lawrence, S., 5291 Leach, P., Luotonen, A., and L. Stewart, "HTTP 5292 Authentication: Basic and Digest Access Authentication", 5293 RFC 2617, June 1999. 5295 [RFC3339] Klyne, G. and C. Newman, "Date and Time on the Internet: 5296 Timestamps", RFC 3339, July 2002. 5298 [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO 5299 10646", STD 63, RFC 3629, November 2003. 5301 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 5302 Resource Identifier (URI): Generic Syntax", STD 66, 5303 RFC 3986, January 2005. 5305 [RFC4122] Leach, P., Mealling, M., and R. Salz, "A Universally 5306 Unique IDentifier (UUID) URN Namespace", RFC 4122, 5307 July 2005. 5309 25.2. Informational References 5311 [I-D.draft-whitehead-http-etag] 5312 Whitehead, J., "Design Considerations for State 5313 Identifiers in HTTP and WebDAV", 5314 draft-whitehead-http-etag-00 (work in progress), 5315 February 2006. 5317 [RFC2291] Slein, J., Vitali, F., Whitehead, E., and D. Durand, 5318 "Requirements for a Distributed Authoring and Versioning 5319 Protocol for the World Wide Web", RFC 2291, February 1998. 5321 [RFC2518] Goland, Y., Whitehead, E., Faizi, A., Carter, S., and D. 5322 Jensen, "HTTP Extensions for Distributed Authoring -- 5323 WEBDAV", RFC 2518, February 1999. 5325 [RFC3023] Murata, M., St. Laurent, S., and D. Kohn, "XML Media 5326 Types", RFC 3023, January 2001. 5328 [RFC3253] Clemm, G., Amsden, J., Ellison, T., Kaler, C., and J. 5329 Whitehead, "Versioning Extensions to WebDAV (Web 5330 Distributed Authoring and Versioning)", RFC 3253, 5331 March 2002. 5333 [RFC3648] Whitehead, J. and J. Reschke, Ed., "Web Distributed 5334 Authoring and Versioning (WebDAV) Ordered Collections 5335 Protocol", RFC 3648, December 2003. 5337 [RFC3744] Clemm, G., Reschke, J., Sedlar, E., and J. Whitehead, "Web 5338 Distributed Authoring and Versioning (WebDAV) Access 5339 Control Protocol", RFC 3744, May 2004. 5341 [RFC3864] Klyne, G., Nottingham, M., and J. Mogul, "Registration 5342 Procedures for Message Header Fields", BCP 90, RFC 3864, 5343 September 2004. 5345 Appendix A. Notes on Processing XML Elements 5347 A.1. Notes on Empty XML Elements 5349 XML supports two mechanisms for indicating that an XML element does 5350 not have any content. The first is to declare an XML element of the 5351 form . The second is to declare an XML element of the form 5352 . The two XML elements are semantically identical. 5354 A.2. Notes on Illegal XML Processing 5356 XML is a flexible data format that makes it easy to submit data that 5357 appears legal but in fact is not. The philosophy of "Be flexible in 5358 what you accept and strict in what you send" still applies, but it 5359 must not be applied inappropriately. XML is extremely flexible in 5360 dealing with issues of white space, element ordering, inserting new 5361 elements, etc. This flexibility does not require extension, 5362 especially not in the area of the meaning of elements. 5364 There is no kindness in accepting illegal combinations of XML 5365 elements. At best it will cause an unwanted result and at worst it 5366 can cause real damage. 5368 A.3. Example - XML Syntax Error 5370 The following request body for a PROPFIND method is illegal. 5372 5373 5374 5375 5376 5378 The definition of the propfind element only allows for the allprop or 5379 the propname element, not both. Thus the above is an error and must 5380 be responded to with a 400 (Bad Request). 5382 Imagine, however, that a server wanted to be "kind" and decided to 5383 pick the allprop element as the true element and respond to it. A 5384 client running over a bandwidth limited line who intended to execute 5385 a propname would be in for a big surprise if the server treated the 5386 command as an allprop. 5388 Additionally, if a server were lenient and decided to reply to this 5389 request, the results would vary randomly from server to server, with 5390 some servers executing the allprop directive, and others executing 5391 the propname directive. This reduces interoperability rather than 5392 increasing it. 5394 A.4. Example - Unexpected XML Element 5396 The previous example was illegal because it contained two elements 5397 that were explicitly banned from appearing together in the propfind 5398 element. However, XML is an extensible language, so one can imagine 5399 new elements being defined for use with propfind. Below is the 5400 request body of a PROPFIND and, like the previous example, must be 5401 rejected with a 400 (Bad Request) by a server that does not 5402 understand the expired-props element. 5404 5405 5407 5408 5410 To understand why a 400 (Bad Request) is returned let us look at the 5411 request body as the server unfamiliar with expired-props sees it. 5413 5414 5416 5418 As the server does not understand the 'expired-props' element, 5419 according to the WebDAV-specific XML processing rules specified in 5420 Section 17, it must process the request as if the element were not 5421 there. Thus the server sees an empty propfind, which by the 5422 definition of the propfind element is illegal. 5424 Please note that had the extension been additive it would not 5425 necessarily have resulted in a 400 (Bad Request). For example, 5426 imagine the following request body for a PROPFIND: 5428 5429 5431 5432 *boss* 5433 5435 The previous example contains the fictitious element leave-out. Its 5436 purpose is to prevent the return of any property whose name matches 5437 the submitted pattern. If the previous example were submitted to a 5438 server unfamiliar with 'leave-out', the only result would be that the 5439 'leave-out' element would be ignored and a propname would be 5440 executed. 5442 Appendix B. Notes on HTTP Client Compatibility 5444 WebDAV was designed to be, and has been found to be, backward- 5445 compatible with HTTP 1.1. The PUT and DELETE methods are defined in 5446 HTTP and thus may be used by HTTP clients as well as WebDAV-aware 5447 clients, but the responses to PUT and DELETE have been extended in 5448 this specification in ways that only a WebDAV client would be 5449 entirely prepared for. Some theoretical concerns were raised about 5450 whether those responses would cause interoperability problems with 5451 HTTP-only clients, and this section addresses those concerns. 5453 Since any HTTP client ought to handle unrecognized 400-level and 500- 5454 level status codes as errors, the following new status codes should 5455 not present any issues: 422, 423 and 507 (424 is also a new status 5456 code but it appears only in the body of a Multistatus response.) So, 5457 for example, if a HTTP client attempted to PUT or DELETE a locked 5458 resource, the 423 Locked response ought to result in a generic error 5459 presented to the user. 5461 The 207 Multistatus response is interesting because a HTTP client 5462 issuing a DELETE request to a collection might interpret a 207 5463 response as a success, even though it does not realize the resource 5464 is a collection and cannot understand that the DELETE operation might 5465 have been a complete or partial failure. That interpretation isn't 5466 entirely justified, because a 200-level response indicates that the 5467 server "received, understood and accepted" the request, not that the 5468 request resulted in complete success. 5470 One option is that a server could treat a DELETE of a collection as 5471 an atomic operation, and use either 204 No Content in case of 5472 success, or some appropriate error response (400 or 500 level) for an 5473 error. This approach would indeed maximize backward compatibility. 5474 However, since interoperability tests and working group discussions 5475 have not turned up any instances of HTTP clients issuing a DELETE 5476 request against a WebDAV collection, this concern is more theoretical 5477 than practical. Thus, servers are likely to be completely successful 5478 at interoperating with HTTP clients even if they treat any collection 5479 DELETE request as a WebDAV request and send a 207 Multistatus 5480 response. 5482 In general server implementations are encouraged to use the detailed 5483 responses and other mechanisms defined in this document rather than 5484 make changes for theoretical interoperability concerns. 5486 Appendix C. The opaquelocktoken scheme and URIs 5488 The 'opaquelocktoken' URI scheme was defined in [RFC2518] (and 5489 registered by IANA) in order to create syntactically correct and 5490 easy-to-generate URIs out of UUIDs, intended to be used as lock 5491 tokens and to be unique across all resources for all time. 5493 An opaquelocktoken URI is constructed by concatenating the 5494 'opaquelocktoken' scheme with a UUID, along with an optional 5495 extension. Servers can create new UUIDs for each new lock token. If 5496 a server wishes to reuse UUIDs the server MUST add an extension and 5497 the algorithm generating the extension MUST guarantee that the same 5498 extension will never be used twice with the associated UUID. 5500 OpaqueLockToken-URI = "opaquelocktoken:" UUID [Extension] 5501 ; UUID is defined in Section 3 of [RFC4122]. Note that linear 5502 ; white space (LWS) is not allowed between elements of 5503 ; this production. 5505 Extension = path 5506 ; path is defined in Section 3.3 of [RFC3986] 5508 Appendix D. Lock-null Resources 5510 The original WebDAV model for locking unmapped URLs created "lock- 5511 null resources". This model was over-complicated and some 5512 interoperability and implementation problems were discovered. The 5513 new WebDAV model for locking unmapped URLs (see Section 7.3) creates 5514 "locked empty resources". Lock-null resources are deprecated. This 5515 section discusses the original model briefly because clients MUST be 5516 able to handle either model. 5518 In the original "lock-null resource" model, which is no longer 5519 recommended for implementation: 5521 o A lock-null resource sometimes appeared as "Not Found". The 5522 server responds with a 404 or 405 to any method except for PUT, 5523 MKCOL, OPTIONS, PROPFIND, LOCK, UNLOCK. 5525 o A lock-null resource does however show up as a member of its 5526 parent collection. 5528 o The server removes the lock-null resource entirely (its URI 5529 becomes unmapped) if its lock goes away before it is converted to 5530 a regular resource. Recall that locks go away not only when they 5531 expire or are unlcoked, but are also removed if a resource is 5532 renamed or moved, or if any parent collection is renamed or moved. 5534 o The server converts the lock-null resource into a regular resource 5535 if a PUT request to the URL is successful. 5537 o The server converts the lock-null resource into a collection if a 5538 MKCOL request to the URL is successful (though interoperability 5539 experience showed that not all servers followed this requirement). 5541 o Property values were defined for DAV:lockdiscovery and DAV: 5542 supportedlock properties but not necessarily for other properties 5543 like DAV:getcontenttype. 5545 Clients can easily interoperate both with servers that support the 5546 old model "lock-null resources" and the recommended model of "locked 5547 empty resources" by only attempting PUT after a LOCK to an unmapped 5548 URL, not MKCOL or GET. 5550 Appendix E. Guidance for Clients Desiring to Authenticate 5552 Many WebDAV clients already implemented have account settings 5553 (similar to the way email clients store IMAP account settings). 5554 Thus, the WebDAV client would be able to authenticate with its first 5555 couple requests to the server, provided it had a way to get the 5556 authentication challenge from the server with realm name, nonce and 5557 other challenge information. Note that the results of some requests 5558 might vary according to whether the client is authenticated or not -- 5559 a PROPFIND might return more visible resources if the client is 5560 authenticated, yet not fail if the client is anonymous. 5562 There are a number of ways the client might be able to trigger the 5563 server do provide an authentication challenge. This appendix 5564 describes a couple approaches that seem particularly likely to work. 5566 The first approach is to perform a request that ought to require 5567 authentication. However, it's possible that a server might handle 5568 any request even without authentication, so to be entirely safe the 5569 client could add a conditional header to ensure that even if the 5570 request passes permissions checks it's not actually handled by the 5571 server. An example of following this approach would be to use a PUT 5572 request with an "If-Match" header with a made-up ETag value. This 5573 approach might fail to result in an authentication challenge if the 5574 server does not test authorization before testing conditionals as is 5575 required (see Section 8.5), or if the server does not need to test 5576 authorization. 5578 Example - forcing auth challenge with write request 5580 >>Request 5582 PUT /forceauth.txt HTTP/1.1 5583 Host: www.example.com 5584 If-Match: "xxx" 5585 Content-Type: text/plain 5586 Content-Length: 0 5588 The second approach is to use an Authorization header (defined in 5589 [RFC2617]) which is likely to be rejected by the server but which 5590 will then prompt a proper authentication challenge. For example, the 5591 client could start with a PROPFIND request containing an 5592 Authorization header containing a made-up Basic userid:password 5593 string or with actual plausible credentials. This approach relies on 5594 the server responding with a "401 Unauthorized" along with a 5595 challenge if it receives an Authorization header with an unrecognized 5596 username, invalid password, or if it doesn't even handle Basic 5597 authentication. This seems likely to work because of the 5598 requirements of RFC2617: 5600 "If the origin server does not wish to accept the credentials sent 5601 with a request, it SHOULD return a 401 (Unauthorized) response. The 5602 response MUST include a WWW-Authenticate header field containing at 5603 least one (possibly new) challenge applicable to the requested 5604 resource." 5606 There's a slight problem with implementing that recommendation in 5607 some cases, because some servers do not even have challenge 5608 information for certain resources. Thus, when there's no way to 5609 authenticate to a resource or the resource is entirely publicly 5610 available over all accepted methods, the server MAY ignore the 5611 Authorization header, and the client presumably try again later. 5613 Example - forcing auth challenge with Authorization header 5615 >>Request 5617 PROPFIND /docs/ HTTP/1.1 5618 Host: www.example.com 5619 Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ== 5620 Content-type: application/xml; charset="utf-8" 5621 Content-Length: xxxx 5623 [body omitted] 5625 Appendix F. Summary of changes from RFC2518 5627 This section lists major changes between this document and RFC2518, 5628 starting with those that are likely to result in implementation 5629 changes. Servers will advertise support for all changes in this 5630 specification by returning the compliance class "3" in the DAV 5631 response header (see Sections 10.1 and 18.3). 5633 F.1. Changes for both Client and Server Implementations 5635 Collections and Namespace Operations 5637 o The semantics of PROPFIND 'allprop' (Section 9.1) have been 5638 relaxed so that servers may leave out live properties defined in 5639 other specifications, such as [RFC3253] and [RFC3744]. Related to 5640 this, 'allprop' requests can now be extended with the 'include' 5641 syntax to include specific named properties, thereby avoiding 5642 additional requests due to changed 'allprop' semantics. 5644 o Servers are now allowed to reject PROPFIND requests with Depth: 5645 Infinity. Clients that used this will need to be able to do a 5646 series of Depth:1 requests instead. 5648 o Multistatus response bodies now can transport the value of HTTP's 5649 Location response header in the new 'location' element. Clients 5650 may use this to avoid additional roundtrips to the server when 5651 there is a 'response' element with a 3xx status (see 5652 Section 14.24). 5654 o The definition of COPY has been relaxed so that it doesn't require 5655 servers to first delete the target resources anymore (this was a 5656 known incompatibility with [RFC3253]). See Section 9.8. 5658 Headers and Marshalling 5660 o The Destination and If request headers now allow absolute paths in 5661 addition to full URIs (see Section 8.3). This may be useful for 5662 clients operating through a reverse proxy that does rewrite the 5663 Host request header, but not WebDAV-specific headers. 5665 o This specification adopts the error marshalling extensions and the 5666 "precondition/postcondition" terminology defined in [RFC3253] (see 5667 Section 16). Related to that, it adds the "error" XML element 5668 inside multistatus response bodies (see Section 14.5, however note 5669 that it uses a format different from the one recommend in 5670 RFC3253). 5672 o Senders and recipients are now required to support the UTF-16 5673 character encoding in XML message bodies (see Section 19). 5675 Locking 5677 o RFC2518's concept of "lock-null resources" (LNRs) has been 5678 replaced by a simplified approach, the "locked empty resources" 5679 (see Section 7.3). There are some aspects of lock-null resources 5680 clients can not rely on anymore, namely the ability to use them to 5681 create a locked collection or the fact that they disappear upon 5682 UNLOCK when no PUT or MKCOL request was issued. Note that servers 5683 are still allowed to implement LNRs as per RFC2518. 5685 o There is no implicit refresh of locks anymore. Locks are only 5686 refreshed upon explicit request (see Section 9.10.2). 5688 o Clarified that the DAV:owner value supplied in the LOCK request 5689 must be preserved by the server just like a dead property 5690 (Section 14.17). Also added the DAV:lockroot element 5691 (Section 14.12) which allows clients to discover the root of lock. 5693 F.2. Changes for Server Implementations 5695 Collections and Namespace Operations 5697 o Due to interoperability problems, allowable formats for contents 5698 of 'href' elements in multistatus responses have been limited (see 5699 Section 8.3). 5701 o Due to lack of implementation, support for the 'propertybehaviour' 5702 request body for COPY and MOVE has been removed. Instead, 5703 requirements for property preservation have been clarified (see 5704 Sections 9.8 and 9.9). 5706 Properties 5708 o Strengthened server requirements for storage of property values, 5709 in particular persistence of language information (xml:lang), 5710 whitespace, and XML namespace information (see Section 4.3). 5712 o Clarified requirements on which properties should be writeable by 5713 the client; in particular, setting "DAV:displayname" should be 5714 supported by servers (see Section 15). 5716 o Only 'rfc1123-date' productions are legal as values for DAV: 5717 getlastmodified (see Section 15.7). 5719 Headers and Marshalling 5720 o Servers are now required to do authorization checks before 5721 processing conditional headers (see Section 8.5). 5723 Locking 5725 o Strengthened requirement to check identity of lock creator when 5726 accessing locked resources (see Section 6.4). Clients should be 5727 aware that lock tokens returned to other principals can only be 5728 used to break a lock, if at all. 5730 o Section 8.10.4 of [RFC2518] incorrectly required servers to return 5731 a 409 status where a 207 status was really appropriate. This has 5732 been corrected (Section 9.10). 5734 F.3. Other Changes 5736 The definition of collection state has been fixed so it doesn't vary 5737 anymore depending on the Request-URI (see Section 5.2). 5739 The DAV:source property introduced in Section 4.6 of [RFC2518] was 5740 removed due to lack of implementation experience. 5742 The DAV header now allows non-IETF extensions through URIs in 5743 addition to compliance class tokens. It also can now be used in 5744 requests, although this specification does not define any associated 5745 semantics for the compliance classes defined in here (see 5746 Section 10.1). 5748 In RFC2518, the definition of the Depth header (Section 9.2) required 5749 that by default request headers would be applied to each resource in 5750 scope. Based on implementation experience, the default has now been 5751 reversed (see Section 10.2). 5753 The definitions of HTTP status code 102 ([RFC2518], Section 10.1) and 5754 the Status-URI response header (Section 9.7) have been removed due to 5755 lack of implementation. 5757 The TimeType format used in the Timeout request header and the 5758 "timeout" XML element used to be extensible. Now, only the two 5759 formats defined by this specification are allowed (see Section 10.7). 5761 Appendix G. Change Log (to be removed by RFC Editor before publication) 5763 G.1. Changes from -05 to -06 5765 Specified that a successful LOCK request to an unmapped URL creates a 5766 new, empty locked resource. 5768 Resolved UNLOCK_NEEDS_IF_HEADER by clarifying that only Lock-Token 5769 header is needed on UNLOCK. 5771 Added Section 16 on preconditions and postconditions and defined a 5772 number of preconditions and postconditions. The 'lock-token- 5773 submitted' precondition resolves the REPORT_OTHER_RESOURCE_LOCKED 5774 issue. 5776 Added example of matching lock token to URI in the case of a 5777 collection lock in the If header section. 5779 Removed ability for Destination header to take "abs_path" in order to 5780 keep consistent with other places where client provides URLs (If 5781 header, href element in request body) 5783 Clarified the href element - that it generally contains HTTP URIs but 5784 not always. 5786 Attempted to fix the BNF describing the If header to allow commas 5788 Clarified presence of Depth header on LOCK refresh requests. 5790 G.2. Changes in -07 5792 Added text to "COPY and the Overwrite Header" section to resolve 5793 issue OVERWRITE_DELETE_ALL_TOO_STRONG. 5795 Added text to "HTTP URL Namespace Model" section to provide more 5796 clarification and examples on what consistency means and what is not 5797 required, to resolve issue CONSISTENCY. 5799 Resolve DEFINE_PRINCIPAL by importing definition of principal from 5800 RFC3744. 5802 Resolve INTEROP_DELETE_AND_MULTISTATUS by adding appendix 3 5803 discussing backward-compatibility concerns. 5805 Resolve DATE_FORMAT_GETLASTMODIFIED by allowing only rfc1123-date, 5806 not HTTP-date for getlastmodified. 5808 Resolve COPY_INTO_YOURSELF_CLARIFY by adding sentence to first para. 5810 of COPY section. 5812 Confirm that WHEN_TO_MULTISTATUS_FOR_DELETE_1 and 5813 WHEN_TO_MULTISTATUS_FOR_DELETE_2 are resolved and tweak language in 5814 DELETE section slightly to be clearly consistent. 5816 More text clarifications to deal with several of the issues in 5817 LOCK_ISSUES. This may not completely resolve that set but we need 5818 feedback from the originator of the issues at this point. 5820 Resolved COPY_INTO_YOURSELF_CLARIFY with new sentence in Copy For 5821 Collections section. 5823 Double checked that LEVEL_OR_CLASS is resolved by using class, not 5824 level. 5826 Further work to resolve IF_AND_AUTH and LOCK_SEMANTICS, clarifying 5827 text on using locks and being authenticated. 5829 Added notes on use of 503 status response to resolve issue 5830 PROPFIND_INFINITY 5832 Removed section on other uses of Metadata (and associated references) 5834 Added reference to RFC4122 for lock tokens and removed section on 5835 generating UUIDs 5837 Explained that even with language variation, a property has only one 5838 value (Section 4.5). 5840 Added section on lock owner (7.1) and what to do if lock requested by 5841 unauthenticated user 5843 Removed Section 4.2 -- justification on why to have metadata, not 5844 needed now 5846 Removed paragraph in Section 5.2 about collections with resource type 5847 "DAV:collection" but which are non-WebDAV compliant -- not 5848 implemented. 5850 G.3. Changes in -08 5852 Added security considerations section on scripts and cookie sessions, 5853 suggested by Barry Lind 5855 Clarified which error codes are defined and undefined in MultiStatus 5857 Moved opaquelocktoken definition to an appendix and refer to RFC4122 5858 for use of 'urn:uuid:' URI scheme; fix all lock token examples to use 5859 this. 5861 Multi-status responses contain URLs which MUST either be absolute 5862 (and begin with the Request-URI or MUST be relative with new 5863 limitations. (bug 12) 5865 Moved status code sections before example sections within PROPFIND 5866 section for section ordering consistency. 5868 Clarified use of Location header with Multi-Status 5870 Bugzilla issue resolutions: bugs 9, 12, 14, 19, 20, 29, 30, 34, 36, 5871 102 and 172. 5873 G.4. Changes in -09 5875 Bugzilla editorial issues: bugs 30, 57, 63, 68, 88, 89, 168, 180, 5876 182, 185, 187. 5878 More clarity between URL namespaces and XML namespaces, particularly 5879 at the beginning of paragraphs using the word namespace 5881 More consistency in referring to properties with the namespace, as in 5882 "DAV:lockdiscovery", and referring to XML element names in single 5883 quotes, e.g. 'allprop' element. 5885 Figure (example) formatting fixes 5887 Bugzilla issues: bugs 24, 37, 39, 43, 45, 27, 25 5889 Replaced references to "non-null state" of resources with more clear 5890 language about URLs that are mapped to resources, bug 25. Also added 5891 definition of URL/URI mapping. Bug 40. 5893 Bugzilla issues: bug 7, 8, 9, 41, 47, 51, 62, 93, 171, 172. Bugs 28 5894 and 94 were iterated on. 5896 Bugzilla issues: 56, 59, 79, 99, 103, 175, 178. Part of bug 23. 5897 Iteration on bug 10. 5899 Iteration on bugs 10, 46 and 47. Bug 11. 5901 Remove "102 Processing" response 5903 Fix bug 46, 105, 107, 120, 140 and 201. 5905 Another stab at bug 12 - relative v. absolute URLs in Multi-Status 5906 response hrefs 5908 Fix bug 6, 11, 15, 16, 28, 32, 42, 51, 52, 53, 58, 60, 62, 186, 189, 5909 191, 199, 200 5911 Fix bug 96 5913 G.5. Changes in -10 5915 Clarify lock intro text on when a client might use another client's 5916 lock token - suggestion by Geoff, Nov 15 5918 Removed Force-Authenticate header and instead added an appendix 5919 explaining how existing mechanisms might resolve the need of clients 5920 to get an authentication challenge (bug 18). 5922 Bug 62, 113, 125, 131, 143, 144, 171, 193 5924 Bug 176, 177, 179, 181, 184, 206, 207, 208 5926 G.6. Changes in -11 5928 Bug 10, 50, 92, 213, 214, 215 5930 not recommend use of 414 for over-long Destination URI, bug 179 5932 Changes for bug 10, 31, 42, 44, 46, 47, 80, 86, 99, 124, 132, 143, 5933 147, 152, 166, 177, 188, 216, 218 5935 Various changes discussed in conference call, including bug 10, 42, 5936 44, 80, 97, 152. 5938 Bugs 55, 85, 86 5940 G.7. Changes in -12 5942 Incorporated GULP (Lock model) into document, making a fair number of 5943 changes to rationalize the new order of explaining things, keeping 5944 text that explains a lock model concept in more detail but removing 5945 text that is redundant or inconsistent. 5947 Various bugs including 46, 48, 53, 97, 152, 179, 184, 188, 200, 210, 5948 211, and 225. Moved URL Handling from Multi-Status section to 5949 general request and response handling section as it now applies to 5950 Destination and If as well as 'href' in Multi-Status. Moved GR&RH 5951 section up one level to be the new Section 8. 5953 Bug 53, 184, 210, 213, 217, 221 5954 Further rewriting of URL Handling section. Changes resulting from 5955 discussion of empty locked resources and how servers should handle 5956 Content-Type in that situation. Bug 48, 179. 5958 Bug 227, 228 5960 G.8. Changes in -13 5962 Moved the timeout model text and clarified it (bug 229). 5964 Fixed the definition of collection state (bug 227). 5966 Made the depth header required on PROPFIND requests (bug 213). 5968 Fixed inconsistencies in Destination header definition (bug 211). 5970 Improved appendix on HTTP client compatibility (bug 100). 5972 Fixed external references with unwieldy pointers (bug 72). 5974 G.9. Changes in -14 5976 Changes section rewritten, if section rewritten 5978 Collection definition and membership requirements changed (bug 227) 5980 Bug 100 and 229 iterations, smallish editorial changes 5982 G.10. Changes in -15 5984 Moved lock-null resource explanation to an appendix. 5986 Reverted to RFC2518 behavior of refreshing lock with "If" header. 5988 Removed section on locks and multiple bindings. 5990 Removed requirement for clients to upate a property only once in a 5991 PROPPATCH. 5993 Updated displayname property description. 5995 Copy-edit level changes e.g. "read-only" to "protected", and defining 5996 what it means to protect a resource with a lock. 5998 Author's Address 6000 Lisa Dusseault (editor) 6001 Open Source Application Foundation 6002 2064 Edgewood Dr. 6003 Palo Alto, CA 94303 6004 US 6006 Email: lisa@osafoundation.org 6008 Intellectual Property Statement 6010 The IETF takes no position regarding the validity or scope of any 6011 Intellectual Property Rights or other rights that might be claimed to 6012 pertain to the implementation or use of the technology described in 6013 this document or the extent to which any license under such rights 6014 might or might not be available; nor does it represent that it has 6015 made any independent effort to identify any such rights. Information 6016 on the procedures with respect to rights in RFC documents can be 6017 found in BCP 78 and BCP 79. 6019 Copies of IPR disclosures made to the IETF Secretariat and any 6020 assurances of licenses to be made available, or the result of an 6021 attempt made to obtain a general license or permission for the use of 6022 such proprietary rights by implementers or users of this 6023 specification can be obtained from the IETF on-line IPR repository at 6024 http://www.ietf.org/ipr. 6026 The IETF invites any interested party to bring to its attention any 6027 copyrights, patents or patent applications, or other proprietary 6028 rights that may cover technology that may be required to implement 6029 this standard. Please address the information to the IETF at 6030 ietf-ipr@ietf.org. 6032 Disclaimer of Validity 6034 This document and the information contained herein are provided on an 6035 "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS 6036 OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET 6037 ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, 6038 INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE 6039 INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED 6040 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 6042 Copyright Statement 6044 Copyright (C) The Internet Society (2006). This document is subject 6045 to the rights, licenses and restrictions contained in BCP 78, and 6046 except as set forth therein, the authors retain all their rights. 6048 Acknowledgment 6050 Funding for the RFC Editor function is currently provided by the 6051 Internet Society.