idnits 2.17.1 draft-ietf-webdav-rfc2518bis-16.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** It looks like you're using RFC 3978 boilerplate. You should update this to the boilerplate described in the IETF Trust License Policy document (see https://trustee.ietf.org/license-info), which is required now. -- Found old boilerplate from RFC 3978, Section 5.1 on line 16. -- Found old boilerplate from RFC 3978, Section 5.5 on line 6054. -- Found old boilerplate from RFC 3979, Section 5, paragraph 1 on line 6065. -- Found old boilerplate from RFC 3979, Section 5, paragraph 2 on line 6072. -- Found old boilerplate from RFC 3979, Section 5, paragraph 3 on line 6078. ** 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 issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- -- The draft header indicates that this document obsoletes RFC2518, but the abstract doesn't seem to directly say this. It does mention RFC2518 though, so this could be OK. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the RFC 3978 Section 5.4 Copyright Line does not match the current year == Line 573 has weird spacing: '... 493 The value of the property appears inside the property name element. 494 The value may be any kind of well-formed XML content, including both 495 text-only and mixed content. Servers MUST preserve the following XML 496 Information Items (using the terminology from [REC-XML-INFOSET]) in 497 storage and transmission of dead properties: 499 For the property name Element Information Item itself: 501 [namespace name] 503 [local name] 505 [attributes] named "xml:lang" or any such attribute in scope 507 [children] of type element or character 509 On all Element Information Items in the property value: 511 [namespace name] 513 [local name] 515 [attributes] 517 [children] of type element or character 519 On Attribute Information Items in the property value: 521 [namespace name] 523 [local name] 525 [normalized value] 527 On Character Information Items in the property value: 529 [character code] 531 Since prefixes are used in some XML vocabularies (XPath and XML 532 Schema, for example), servers SHOULD preserve, for any Information 533 Item in the value: 535 [prefix] 537 XML Infoset attributes not listed above MAY be preserved by the 538 server, but clients MUST NOT rely on them being preserved. The above 539 rules would also apply by default to live properties, unless defined 540 otherwise. 542 Servers MUST ignore the XML attribute xml:space if present and never 543 use it to change white space handling. White space in property 544 values is significant. 546 4.3.1. Example - Property with Mixed Content 548 Consider a dead property 'author' created by the client as follows: 550 551 552 Jane Doe 553 554 mailto:jane.doe@example.com 556 http://www.example.com 558 559 Jane has been working way too long on the 560 long-awaited revision of ]]>. 561 562 563 565 When this property is requested, a server might return: 567 572 Jane Doe 573 mailto:jane.doe@example.com 575 http://www.example.com 577 578 Jane has been working way too long on the 579 long-awaited revision of <RFC2518>. 580 581 582 584 Note in this example: 586 o The [prefix] for the property name itself was not preserved, being 587 non-significant, all other [prefix] values have been preserved, 589 o attribute values have been rewritten with double quotes instead of 590 single quotes (quoting style is not significant), and attribute 591 order has not been preserved, 593 o the xml:lang attribute has been returned on the property name 594 element itself (it was in scope when the property was set, but the 595 exact position in the response is not considered significant as 596 long as it is in scope), 598 o whitespace between tags has been preserved everywhere (whitespace 599 between attributes not so), 601 o CDATA encapsulation was replaced with character escaping (the 602 reverse would also be legal), 604 o the comment item was stripped (as would have been a processing 605 instruction item). 607 Implementation note: there are cases such as editing scenarios where 608 clients may require that XML content is preserved character-by- 609 character (such as attribute ordering or quoting style). In this 610 case, clients should consider using a text-only property value by 611 escaping all characters that have a special meaning in XML parsing. 613 4.4. Property Names 615 A property name is a universally unique identifier that is associated 616 with a schema that provides information about the syntax and 617 semantics of the property. 619 Because a property's name is universally unique, clients can depend 620 upon consistent behavior for a particular property across multiple 621 resources, on the same and across different servers, so long as that 622 property is "live" on the resources in question, and the 623 implementation of the live property is faithful to its definition. 625 The XML namespace mechanism, which is based on URIs ([RFC3986]), is 626 used to name properties because it prevents namespace collisions and 627 provides for varying degrees of administrative control. 629 The property namespace is flat; that is, no hierarchy of properties 630 is explicitly recognized. Thus, if a property A and a property A/B 631 exist on a resource, there is no recognition of any relationship 632 between the two properties. It is expected that a separate 633 specification will eventually be produced which will address issues 634 relating to hierarchical properties. 636 Finally, it is not possible to define the same property twice on a 637 single resource, as this would cause a collision in the resource's 638 property namespace. 640 4.5. Source Resources and Output Resources 642 Some HTTP resources are dynamically generated by the server. For 643 these resources, there presumably exists source code somewhere 644 governing how that resource is generated. The relationship of source 645 files to output HTTP resources may be one to one, one to many, many 646 to one or many to many. There is no mechanism in HTTP to determine 647 whether a resource is even dynamic, let alone where its source files 648 exist or how to author them. Although this problem would usefully be 649 solved, interoperable WebDAV implementations have been widely 650 deployed without actually solving this problem, by dealing only with 651 static resources. Thus, the source vs. output problem is not solved 652 in this specification and has been deferred to a separate document. 654 5. Collections of Web Resources 656 This section provides a description of a new type of Web resource, 657 the collection, and discusses its interactions with the HTTP URL 658 namespace. The purpose of a collection resource is to model 659 collection-like objects (e.g., file system directories) within a 660 server's namespace. 662 All DAV compliant resources MUST support the HTTP URL namespace model 663 specified herein. 665 5.1. HTTP URL Namespace Model 667 The HTTP URL namespace is a hierarchical namespace where the 668 hierarchy is delimited with the "/" character. 670 An HTTP URL namespace is said to be consistent if it meets the 671 following conditions: for every URL in the HTTP hierarchy there 672 exists a collection that contains that URL as an internal member URL. 673 The root, or top-level collection of the namespace under 674 consideration, is exempt from the previous rule. The top-level 675 collection of the namespace under consideration is not necessarily 676 the collection identified by the absolute path '/', it may be 677 identified by one or more path segments (e.g. /servlets/webdav/...) 679 Neither HTTP/1.1 nor WebDAV require that the entire HTTP URL 680 namespace be consistent -- a WebDAV-compatible resource may not have 681 a parent collection. However, certain WebDAV methods are prohibited 682 from producing results that cause namespace inconsistencies. 684 As is implicit in [RFC2616] and [RFC3986], any resource, including 685 collection resources, MAY be identified by more than one URI. For 686 example, a resource could be identified by multiple HTTP URLs. 688 5.2. Collection Resources 690 Collection resources differ from other resources in that they also 691 act as containers. A collection is a resource whose state consists 692 of at least a set of mappings between path segments and resources, 693 and a set of properties on the collection itself. In this document, 694 a resource B will be said to be contained in the collection resource 695 A if there is a path segment mapping which maps to B and which is 696 contained in A. A collection MUST contain at most one mapping for a 697 given path segment, i.e., it is illegal to have the same path segment 698 mapped to more than one resource. 700 Properties defined on collections behave exactly as do properties on 701 non-collection resources. A collection MAY have additional state 702 such as entity bodies returned by GET. 704 For all WebDAV compliant resources A and B, identified by URLs "U" 705 and "V" respectively, such that "V" is equal to "U/SEGMENT", A MUST 706 be a collection that contains a mapping from "SEGMENT" to B. So, if 707 resource B with URL "http://example.com/bar/blah" is WebDAV compliant 708 and if resource A with URL "http://example.com/bar/" is WebDAV 709 compliant, then resource A must be a collection and must contain 710 exactly one mapping from "blah" to B. 712 Although commonly a mapping consists of a single segment and a 713 resource, in general, a mapping consists of a set of segments and a 714 resource. This allows a server to treat a set of segments as 715 equivalent (i.e. either all of the segments are mapped to the same 716 resource, or none of the segments are mapped to a resource). For 717 example, a server that performs case-folding on segments will treat 718 the segments "ab", "Ab", "aB", and "AB" as equivalent. A client can 719 then use any of these segments to identify the resource. Note that a 720 PROPFIND result will select one of these equivalent segments to 721 identify the mapping, so there will be one PROPFIND response element 722 per mapping, not one per segment in the mapping. 724 Collection resources MAY have mappings to non-WebDAV compliant 725 resources in the HTTP URL namespace hierarchy but are not required to 726 do so. For example, if resource X with URL 727 "http://example.com/bar/blah" is not WebDAV compliant and resource A 728 with "URL http://example.com/bar/" identifies a WebDAV collection, 729 then A may or may not have a mapping from "blah" to X. 731 If a WebDAV compliant resource has no WebDAV compliant internal 732 members in the HTTP URL namespace hierarchy then the WebDAV compliant 733 resource is not required to be a collection. 735 There is a standing convention that when a collection is referred to 736 by its name without a trailing slash, the server MAY handle the 737 request as if the trailing slash were present. In this case it 738 SHOULD return a Content-Location header in the response, pointing to 739 the URL ending with the "/". For example, if a client invokes a 740 method on http://example.com/blah (no trailing slash), the server may 741 respond as if the operation were invoked on http://example.com/blah/ 742 (trailing slash), and should return a Content-Location header with 743 the value http://example.com/blah/. Wherever a server produces a URL 744 referring to a collection, the server SHOULD include the trailing 745 slash. In general clients SHOULD use the trailing slash form of 746 collection names. If clients do not use the trailing slash form the 747 client needs to be prepared to see a redirect response. Clients will 748 find the DAV:resourcetype property more reliable than the URL to find 749 out if a resource is a collection. 751 Clients MUST be able to support the case where WebDAV resources are 752 contained inside non-WebDAV resources. For example, if a OPTIONS 753 response from "http://example.com/servlet/dav/collection" indicates 754 WebDAV support, the client cannot assume that 755 "http://example.com/servlet/dav/" or its parent necessarily are 756 WebDAV collections. 758 A typical scenario in which mapped URLs do not appear as members of 759 their parent collection is the case where a server allows links or 760 redirects to non-WebDAV resources. For instance, "/col/link" might 761 not appear as a member of "/col/", although the server would respond 762 with a 302 status to a GET request to "/col/link", thus the URL 763 "/col/link" would indeed be mapped. Similarly, a dynamically- 764 generated page might have a URL mapping from "/col/index.html", thus 765 this resource might respond with a 200 OK to a GET request yet not 766 appear as a member of "/col/". 768 Some mappings to even WebDAV-compliant resources might not appear in 769 the parent collection. An example for this case are servers that 770 support multiple alias URLs for each WebDAV compliant resource. A 771 server may implement case-insensitive URLs, thus "/col/a" and 772 "/col/A" identify the same resource, yet only either "a" or "A" are 773 reported upon listing the members of "/col". In cases where a server 774 treats a set of segments as equivalent, the server MUST expose only 775 one preferred segment per mapping, consistently chosen, in PROPFIND 776 responses. 778 6. Locking 780 The ability to lock a resource provides a mechanism for serializing 781 access to that resource. Using a lock, an authoring client can 782 provide a reasonable guarantee that another principal will not modify 783 a resource while it is being edited. In this way, a client can 784 prevent the "lost update" problem. 786 This specification allows locks to vary over two client-specified 787 parameters, the number of principals involved (exclusive vs. shared) 788 and the type of access to be granted. This document defines locking 789 for only one access type, write. However, the syntax is extensible, 790 and permits the eventual specification of locking for other access 791 types. 793 6.1. Lock Model 795 This section provides a concise model for how locking behaves. Later 796 sections will provide more detail on some of the concepts and refer 797 back to these model statements. Normative statements related to LOCK 798 and UNLOCK method handling can be found in the sections on those 799 methods, whereas normative statements that cover any method are 800 gathered here. 802 1. A lock either directly or indirectly locks a resource. 804 2. A resource becomes directly locked when a LOCK request to a URL 805 of that resource creates a new lock. The "lock-root" of the new 806 lock is that URL. If at the time of the request, the URL is not 807 mapped to a resource, a new empty resource is created and 808 directly locked. 810 3. An exclusive lock (Section 6.2) conflicts with any other kind of 811 lock on the same resource, whether either lock is direct or 812 indirect. A server MUST NOT create conflicting locks on a 813 resource. 815 4. For a collection that is locked with an infinite depth lock L, 816 all member resources are indirectly locked. Changes in 817 membership of a such a collection affect the set of indirectly 818 locked resources: 820 * If a member resource is added to the collection, the new 821 member resource MUST NOT already have a conflicting lock, 822 because the new resource MUST become indirectly locked by L. 824 * If a member resource stops being a member of the collection, 825 then the resource MUST no longer be indirectly locked by L. 827 5. Each lock is identified by a single unique lock token 828 (Section 6.5). 830 6. An UNLOCK request deletes the lock with the specified lock token. 831 After a lock is deleted, no resource is locked by that lock. 833 7. A lock token is "submitted" in a request when it appears in an If 834 header (the Write Lock (Section 7) section discusses when token 835 submission is required for write locks). 837 8. If a request causes the lock-root of any lock to become an 838 unmapped URL, then the lock MUST also be deleted by that request. 840 6.2. Exclusive Vs. Shared Locks 842 The most basic form of lock is an exclusive lock. Exclusive locks 843 avoid having to deal with content change conflicts, without requiring 844 any coordination other than the methods described in this 845 specification. 847 However, there are times when the goal of a lock is not to exclude 848 others from exercising an access right but rather to provide a 849 mechanism for principals to indicate that they intend to exercise 850 their access rights. Shared locks are provided for this case. A 851 shared lock allows multiple principals to receive a lock. Hence any 852 principal that has both access privileges and a valid lock can use 853 the locked resource. 855 With shared locks there are two trust sets that affect a resource. 856 The first trust set is created by access permissions. Principals who 857 are trusted, for example, may have permission to write to the 858 resource. Among those who have access permission to write to the 859 resource, the set of principals who have taken out a shared lock also 860 must trust each other, creating a (typically) smaller trust set 861 within the access permission write set. 863 Starting with every possible principal on the Internet, in most 864 situations the vast majority of these principals will not have write 865 access to a given resource. Of the small number who do have write 866 access, some principals may decide to guarantee their edits are free 867 from overwrite conflicts by using exclusive write locks. Others may 868 decide they trust their collaborators will not overwrite their work 869 (the potential set of collaborators being the set of principals who 870 have write permission) and use a shared lock, which informs their 871 collaborators that a principal may be working on the resource. 873 The WebDAV extensions to HTTP do not need to provide all of the 874 communications paths necessary for principals to coordinate their 875 activities. When using shared locks, principals may use any out of 876 band communication channel to coordinate their work (e.g., face-to- 877 face interaction, written notes, post-it notes on the screen, 878 telephone conversation, Email, etc.) The intent of a shared lock is 879 to let collaborators know who else may be working on a resource. 881 Shared locks are included because experience from web distributed 882 authoring systems has indicated that exclusive locks are often too 883 rigid. An exclusive lock is used to enforce a particular editing 884 process: take out an exclusive lock, read the resource, perform 885 edits, write the resource, release the lock. This editing process 886 has the problem that locks are not always properly released, for 887 example when a program crashes, or when a lock creator leaves without 888 unlocking a resource. While both timeouts (Section 6.6) and 889 administrative action can be used to remove an offending lock, 890 neither mechanism may be available when needed; the timeout may be 891 long or the administrator may not be available. 893 A successful request for a new shared lock MUST result in the 894 generation of a unique lock associated with the requesting principal. 895 Thus if five principals have taken out shared write locks on the same 896 resource there will be five locks and five lock tokens, one for each 897 principal. 899 6.3. Required Support 901 A WebDAV compliant resource is not required to support locking in any 902 form. If the resource does support locking it may choose to support 903 any combination of exclusive and shared locks for any access types. 905 The reason for this flexibility is that locking policy strikes to the 906 very heart of the resource management and versioning systems employed 907 by various storage repositories. These repositories require control 908 over what sort of locking will be made available. For example, some 909 repositories only support shared write locks while others only 910 provide support for exclusive write locks while yet others use no 911 locking at all. As each system is sufficiently different to merit 912 exclusion of certain locking features, this specification leaves 913 locking as the sole axis of negotiation within WebDAV. 915 6.4. Lock Creator and Privileges 917 The creator of a lock has special privileges to use the lock to 918 modify the resource. When a locked resource is modified, a server 919 MUST check that the authenticated principal matches the lock creator 920 (in addition to checking for valid lock token submission). 922 The server MAY allow privileged users other than the lock creator to 923 destroy a lock (for example, the resource owner or an administrator). 924 The 'unlock' privilege in [RFC3744] was defined to provide that 925 permission. 927 There is no requirement for servers to accept LOCK requests from all 928 users or from anonymous users. 930 Note that having a lock does not confer full privilege to modify the 931 locked resource. Write access and other privileges MUST be enforced 932 through normal privilege or authentication mechanisms, not based on 933 the possible obscurity of lock token values. 935 6.5. Lock Tokens 937 A lock token is a type of state token which identifies a particular 938 lock. Each lock has exactly one unique lock token generated by the 939 server. Clients MUST NOT attempt to interpret lock tokens in any 940 way. 942 Lock token URIs MUST be unique across all resources for all time. 943 This uniqueness constraint allows lock tokens to be submitted across 944 resources and servers without fear of confusion. Since lock tokens 945 are unique, a client MAY submit a lock token in an If header on a 946 resource other than the one that returned it. 948 When a LOCK operation creates a new lock, the new lock token is 949 returned in the Lock-Token response header defined in Section 10.5, 950 and also in the body of the response. 952 Servers MAY make lock tokens publicly readable (e.g. in the DAV: 953 lockdiscovery property). One use case for making lock tokens 954 readable is so that a long-lived lock can be removed by the resource 955 owner (the client that obtained the lock might have crashed or 956 disconnected before cleaning up the lock). Except for the case of 957 using UNLOCK under user guidance, a client SHOULD NOT use a lock 958 token created by another client instance. 960 This specification encourages servers to create UUIDs for lock 961 tokens, and to use the URI form defined by "A Universally Unique 962 Identifier (UUID) URN Namespace" ([RFC4122]). However servers are 963 free to use any URI (e.g. from another scheme) so long as it meets 964 the uniqueness requirements. For example, a valid lock token might 965 be constructed using the "opaquelocktoken" scheme defined in 966 Appendix C. 968 Example: "urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6" 970 6.6. Lock Timeout 972 A lock MAY have a limited lifetime. The lifetime is suggested by the 973 client when creating or refreshing the lock, but the server 974 ultimately chooses the timeout value. Timeout is measured in seconds 975 remaining until lock expiration. 977 The timeout counter MUST be restarted if a refresh lock request is 978 successful (see Section 9.10.2). The timeout counter SHOULD NOT be 979 restarted at any other time. 981 If the timeout expires then the lock SHOULD be removed. In this case 982 the server SHOULD act as if an UNLOCK method was executed by the 983 server on the resource using the lock token of the timed-out lock, 984 performed with its override authority. Thus logs should be updated 985 with the disposition of the lock, notifications should be sent, etc., 986 just as they would be for an UNLOCK request. 988 Servers are advised to pay close attention to the values submitted by 989 clients, as they will be indicative of the type of activity the 990 client intends to perform. For example, an applet running in a 991 browser may need to lock a resource, but because of the instability 992 of the environment within which the applet is running, the applet may 993 be turned off without warning. As a result, the applet is likely to 994 ask for a relatively small timeout value so that if the applet dies, 995 the lock can be quickly harvested. However, a document management 996 system is likely to ask for an extremely long timeout because its 997 user may be planning on going off-line. 999 A client MUST NOT assume that just because the time-out has expired 1000 the lock has immediately been removed. 1002 Likewise, a client MUST NOT assume that just because the time-out has 1003 not expired, the lock still exists. Clients MUST assume that locks 1004 can arbitrarily disappear at any time, regardless of the value given 1005 in the Timeout header. The Timeout header only indicates the 1006 behavior of the server if extraordinary circumstances do not occur. 1007 For example, a sufficiently privileged user may remove a lock at any 1008 time or the system may crash in such a way that it loses the record 1009 of the lock's existence. 1011 6.7. Lock Capability Discovery 1013 Since server lock support is optional, a client trying to lock a 1014 resource on a server can either try the lock and hope for the best, 1015 or perform some form of discovery to determine what lock capabilities 1016 the server supports. This is known as lock capability discovery. A 1017 client can determine what lock types the server supports by 1018 retrieving the DAV:supportedlock property. 1020 Any DAV compliant resource that supports the LOCK method MUST support 1021 the DAV:supportedlock property. 1023 6.8. Active Lock Discovery 1025 If another principal locks a resource that a principal wishes to 1026 access, it is useful for the second principal to be able to find out 1027 who the first principal is. For this purpose the DAV:lockdiscovery 1028 property is provided. This property lists all outstanding locks, 1029 describes their type, and MAY even provide the lock tokens. 1031 Any DAV compliant resource that supports the LOCK method MUST support 1032 the DAV:lockdiscovery property. 1034 7. Write Lock 1036 This section describes the semantics specific to the write lock type. 1037 The write lock is a specific instance of a lock type, and is the only 1038 lock type described in this specification. 1040 An exclusive write lock protects a resource: it prevents changes by 1041 any principal other than the lock creator and in any case where the 1042 lock token is not submitted (e.g. by a client process other than the 1043 one holding the lock). 1045 Clients MUST submit a lock-token they are authorized to use in any 1046 request which modifies a write-locked resource. The list of 1047 modifications covered by a write-lock include: 1049 1. A change to any of the following aspects of any write-locked 1050 resource: 1052 * any variant, 1054 * any dead property, 1056 * any live property which is lockable (a live property is 1057 lockable unless otherwise defined.) 1059 2. For collections, any modification of an internal member URI. An 1060 internal member URI of a collection is considered to be modified 1061 if it is added, removed, or identifies a different resource. 1062 More discussion on write locks and collections is found in 1063 Section 7.4. 1065 3. A modification of the mapping of the root of the write lock, 1066 either to another resource or to no resource (e.g. DELETE). 1068 Of the methods defined in HTTP and WebDAV, PUT, POST, PROPPATCH, 1069 LOCK, UNLOCK, MOVE, COPY (for the destination resource), DELETE, and 1070 MKCOL are affected by write locks. All other HTTP/WebDAV methods 1071 defined so far, GET in particular, function independently of a write 1072 lock. 1074 The next few sections describe in more specific terms how write locks 1075 interact with various operations. 1077 7.1. Write Locks and Properties 1079 While those without a write lock may not alter a property on a 1080 resource it is still possible for the values of live properties to 1081 change, even while locked, due to the requirements of their schemas. 1083 Only dead properties and live properties defined as lockable are 1084 guaranteed not to change while write locked. 1086 7.2. Avoiding Lost Updates 1088 Although the write locks provide some help in preventing lost 1089 updates, they cannot guarantee that updates will never be lost. 1090 Consider the following scenario: 1092 Two clients A and B are interested in editing the resource 1093 'index.html'. Client A is an HTTP client rather than a WebDAV 1094 client, and so does not know how to perform locking. 1096 Client A doesn't lock the document, but does a GET and begins 1097 editing. 1099 Client B does LOCK, performs a GET and begins editing. 1101 Client B finishes editing, performs a PUT, then an UNLOCK. 1103 Client A performs a PUT, overwriting and losing all of B's changes. 1105 There are several reasons why the WebDAV protocol itself cannot 1106 prevent this situation. First, it cannot force all clients to use 1107 locking because it must be compatible with HTTP clients that do not 1108 comprehend locking. Second, it cannot require servers to support 1109 locking because of the variety of repository implementations, some of 1110 which rely on reservations and merging rather than on locking. 1111 Finally, being stateless, it cannot enforce a sequence of operations 1112 like LOCK / GET / PUT / UNLOCK. 1114 WebDAV servers that support locking can reduce the likelihood that 1115 clients will accidentally overwrite each other's changes by requiring 1116 clients to lock resources before modifying them. Such servers would 1117 effectively prevent HTTP 1.0 and HTTP 1.1 clients from modifying 1118 resources. 1120 WebDAV clients can be good citizens by using a lock / retrieve / 1121 write /unlock sequence of operations (at least by default) whenever 1122 they interact with a WebDAV server that supports locking. 1124 HTTP 1.1 clients can be good citizens, avoiding overwriting other 1125 clients' changes, by using entity tags in If-Match headers with any 1126 requests that would modify resources. 1128 Information managers may attempt to prevent overwrites by 1129 implementing client-side procedures requiring locking before 1130 modifying WebDAV resources. 1132 7.3. Write Locks and Unmapped URLs 1134 WebDAV provides the ability to send a LOCK request to an unmapped URL 1135 in order to reserve the name for use. This is a simple way to avoid 1136 the lost-update problem on the creation of a new resource (another 1137 way is to use If-None-Match header specified in Section 14.26 of 1138 [RFC2616]). It has the side benefit of locking the new resource 1139 immediately for use of the creator. 1141 Note that the lost-update problem is not an issue for collections 1142 because MKCOL can only be used to create a collection, not to 1143 overwrite an existing collection. When trying to lock a collection 1144 upon creation, clients can attempt to increase the likelihood of 1145 getting the lock by pipelining the MKCOL and LOCK requests together 1146 (but because this doesn't convert two separate operations into one 1147 atomic operation there's no guarantee this will work). 1149 A successful lock request to an unmapped URL MUST result in the 1150 creation of a locked (non-collection) resource with empty content. 1151 Subsequently, a successful PUT request (with the correct lock token) 1152 provides the content for the resource. Note that the LOCK request 1153 has no mechanism for the client to provide Content-Type or Content- 1154 Language, thus the server will use defaults or empty values and rely 1155 on the subsequent PUT request for correct values. 1157 A resource created with a LOCK is empty but otherwise behaves in 1158 every way as a normal resource. It behaves the same way as a 1159 resource created by a PUT request with an empty body (and where a 1160 Content-Type and Content-Language was not specified), followed by a 1161 LOCK request to the same resource. Following from this model, a 1162 locked empty resource: 1164 o Can be read, deleted, moved, copied, and in all ways behave as a 1165 regular non-collection resource. 1167 o Appears as a member of its parent collection. 1169 o SHOULD NOT disappear when its lock goes away (clients must 1170 therefore be responsible for cleaning up their own mess, as with 1171 any other operation or any non-empty resource) 1173 o MAY NOT have values for properties like DAV:getcontentlanguage 1174 which haven't been specified yet by the client. 1176 o Can be updated (have content added) with a PUT request. 1178 o MUST NOT be converted into a collection. The server MUST fail a 1179 MKCOL request (as it would with a MKCOL request to any existing 1180 non-collection resource). 1182 o MUST have defined values for DAV:lockdiscovery and DAV: 1183 supportedlock properties. 1185 o The response MUST indicate that a resource was created, by use of 1186 the "201 Created" response code (a LOCK request to an existing 1187 resource instead will result in 200 OK). The body must still 1188 include the DAV:lockdiscovery property, as with a LOCK request to 1189 an existing resource. 1191 The client is expected to update the locked empty resource shortly 1192 after locking it, using PUT and possibly PROPPATCH. 1194 Alternatively and for backwards compatibility to [RFC2518], servers 1195 MAY implement Lock-Null Resources (LNRs) instead (see definition in 1196 Appendix D). Clients can easily interoperate both with servers that 1197 support the old model LNRs and the recommended model of "locked empty 1198 resources" by only attempting PUT after a LOCK to an unmapped URL, 1199 not MKCOL or GET, and by not relying on specific properties of LNRs. 1201 7.4. Write Locks and Collections 1203 There are two kinds of collection write locks. A "Depth 0" write 1204 lock on a collection protects the collection properties plus the 1205 internal member URLs of that one collection, while not protecting the 1206 content or properties of member resources (if the collection itself 1207 has any entity bodies, those are also protected). A "Depth: 1208 infinity" write lock on a collection provides the same protection on 1209 that collection and also provides write lock protection on every 1210 member resource. 1212 Expressed otherwise, a write lock protects any request that would 1213 create a new resource in a write locked collection, any request that 1214 would remove an internal member URL of a write locked collection, and 1215 any request that would change the segment name of any internal 1216 member. 1218 Thus, a collection write lock protects all the following actions: 1220 o DELETE a collection's direct internal member, 1222 o MOVE an internal member out of the collection, 1224 o MOVE an internal member into the collection, 1226 o MOVE to rename an internal member within a collection, 1227 o COPY an internal member into a collection, and 1229 o PUT or MKCOL request which would create a new internal member. 1231 The collection's lock token is required in addition to the lock token 1232 on the internal member itself, if it is locked separately. 1234 In addition, a depth-infinity lock affects all write operations to 1235 all members of the locked collection. With a depth-infinity lock, 1236 the resource identified by the root of the lock is directly locked, 1237 and all its members are indirectly locked. 1239 o Any new resource added as a descendent of a depth-infinity locked 1240 collection becomes indirectly locked. 1242 o Any indirectly locked resource moved out of the locked collection 1243 into an unlocked collection is thereafter unlocked. 1245 o Any indirectly locked resource moved out of a locked source 1246 collection into a depth-infinity locked target collection remains 1247 indirectly locked but is now protected by the lock on the target 1248 collection (the target collection's lock token will thereafter be 1249 required to make further changes). 1251 If a depth-infinity write LOCK request is issued to a collection 1252 containing member URLs identifying resources that are currently 1253 locked in a manner which conflicts with the new lock (see Section 6.1 1254 point 3), the request MUST fail with a 423 (Locked) status code, and 1255 the response SHOULD contain the 'no-conflicting-lock' precondition. 1257 If a lock request causes the URL of a resource to be added as an 1258 internal member URL of a depth-infinity locked collection then the 1259 new resource MUST be automatically protected by the lock. For 1260 example, if the collection /a/b/ is write locked and the resource /c 1261 is moved to /a/b/c then resource /a/b/c will be added to the write 1262 lock. 1264 7.5. Write Locks and the If Request Header 1266 A user agent has to demonstrate knowledge of a lock when requesting 1267 an operation on a locked resource. Otherwise, the following scenario 1268 might occur. In the scenario, program A, run by User A, takes out a 1269 write lock on a resource. Program B, also run by User A, has no 1270 knowledge of the lock taken out by program A, yet performs a PUT to 1271 the locked resource. In this scenario, the PUT succeeds because 1272 locks are associated with a principal, not a program, and thus 1273 program B, because it is acting with principal A's credential, is 1274 allowed to perform the PUT. However, had program B known about the 1275 lock, it would not have overwritten the resource, preferring instead 1276 to present a dialog box describing the conflict to the user. Due to 1277 this scenario, a mechanism is needed to prevent different programs 1278 from accidentally ignoring locks taken out by other programs with the 1279 same authorization. 1281 In order to prevent these collisions a lock token MUST be submitted 1282 by an authorized principal for all locked resources that a method may 1283 change or the method MUST fail. A lock token is submitted when it 1284 appears in an If header. For example, if a resource is to be moved 1285 and both the source and destination are locked then two lock tokens 1286 must be submitted in the If header, one for the source and the other 1287 for the destination. 1289 7.5.1. Example - Write Lock and COPY 1291 >>Request 1293 COPY /~fielding/index.html HTTP/1.1 1294 Host: www.example.com 1295 Destination: http://www.example.com/users/f/fielding/index.html 1296 If: 1297 () 1299 >>Response 1301 HTTP/1.1 204 No Content 1303 In this example, even though both the source and destination are 1304 locked, only one lock token must be submitted, for the lock on the 1305 destination. This is because the source resource is not modified by 1306 a COPY, and hence unaffected by the write lock. In this example, 1307 user agent authentication has previously occurred via a mechanism 1308 outside the scope of the HTTP protocol, in the underlying transport 1309 layer. 1311 7.5.2. Example - Deleting a member of a locked collection 1313 Consider a collection "/locked" exclusively write-locked with Depth: 1314 Infinity, and an attempt to delete an internal member "/locked/ 1315 member": 1317 >>Request 1319 DELETE /locked/member HTTP/1.1 1320 Host: example.com 1322 >>Response 1324 HTTP/1.1 423 Locked 1325 Content-Type: application/xml; charset="utf-8" 1326 Content-Length: xxxx 1328 1329 1330 1331 /locked/ 1332 1333 1335 Thus the client would need to submit the lock token with the request 1336 to make it succeed. To do that, various forms of the If header (see 1337 Section 10.4) could be used. 1339 "No-Tag-List" format: 1341 If: () 1343 "Tagged-List" format, for "http://example.com/locked/": 1345 If: 1346 () 1348 "Tagged-List" format, for "http://example.com/locked/member": 1350 If: 1351 () 1353 Note that for the purpose of submitting the lock token the actual 1354 form doesn't matter; what's relevant is that the lock token appears 1355 in the If header, and that the If header itself evaluates to true. 1357 7.6. Write Locks and COPY/MOVE 1359 A COPY method invocation MUST NOT duplicate any write locks active on 1360 the source. However, as previously noted, if the COPY copies the 1361 resource into a collection that is locked with "Depth: infinity", 1362 then the resource will be added to the lock. 1364 A successful MOVE request on a write locked resource MUST NOT move 1365 the write lock with the resource. However, if there is an existing 1366 lock at the destination, the server MUST add the moved resource to 1367 the destination lock scope. For example, if the MOVE makes the 1368 resource a child of a collection that is locked with "Depth: 1369 infinity", then the resource will be added to that collection's lock. 1371 Additionally, if a resource locked with "Depth: infinity" is moved to 1372 a destination that is within the scope of the same lock (e.g., within 1373 the URL namespace tree covered by the lock), the moved resource will 1374 again be a added to the lock. In both these examples, as specified 1375 in Section 7.5, an If header must be submitted containing a lock 1376 token for both the source and destination. 1378 7.7. Refreshing Write Locks 1380 A client MUST NOT submit the same write lock request twice. Note 1381 that a client is always aware it is resubmitting the same lock 1382 request because it must include the lock token in the If header in 1383 order to make the request for a resource that is already locked. 1385 However, a client may submit a LOCK request with an If header but 1386 without a body. A server receiving a LOCK request with no body MUST 1387 NOT create a new lock -- this form of the LOCK request is only to be 1388 used to "refresh" an existing lock (meaning, at minimum, that any 1389 timers associated with the lock MUST be re-set). 1391 Clients may submit Timeout headers of arbitrary value with their lock 1392 refresh requests. Servers, as always, may ignore Timeout headers 1393 submitted by the client, and a server MAY refresh a lock with a 1394 timeout period that is different than the previous timeout period 1395 used for the lock, provided it advertises the new value in the LOCK 1396 refresh response. 1398 If an error is received in response to a refresh LOCK request the 1399 client MUST NOT assume that the lock was refreshed. 1401 8. General Request and Response Handling 1403 8.1. Precedence in Error Handling 1405 Servers MUST return authorization errors in preference to other 1406 errors. This avoids leaking information about protected resources 1407 (e.g. a client that finds that a hidden resource exists by seeing a 1408 423 Locked response to an anonymous request to the resource). 1410 8.2. Use of XML 1412 In HTTP/1.1, method parameter information was exclusively encoded in 1413 HTTP headers. Unlike HTTP/1.1, WebDAV encodes method parameter 1414 information either in an XML ([REC-XML]) request entity body, or in 1415 an HTTP header. The use of XML to encode method parameters was 1416 motivated by the ability to add extra XML elements to existing 1417 structures, providing extensibility; and by XML's ability to encode 1418 information in ISO 10646 character sets, providing 1419 internationalization support. 1421 In addition to encoding method parameters, XML is used in WebDAV to 1422 encode the responses from methods, providing the extensibility and 1423 internationalization advantages of XML for method output, as well as 1424 input. 1426 When XML is used for a request or response body, the Content-Type 1427 type SHOULD be application/xml. Implementations MUST accept both 1428 text/xml and application/xml in request and response bodies. Use of 1429 text/xml is deprecated. 1431 All DAV compliant clients and resources MUST use XML parsers that are 1432 compliant with [REC-XML] and [REC-XML-NAMES]. All XML used in either 1433 requests or responses MUST be, at minimum, well formed and use 1434 namespaces correctly. If a server receives XML that is not well- 1435 formed then the server MUST reject the entire request with a 400 (Bad 1436 Request). If a client receives XML that is not well-formed in a 1437 response then the client MUST NOT assume anything about the outcome 1438 of the executed method and SHOULD treat the server as malfunctioning. 1440 Note that processing XML submitted by an untrusted source may cause 1441 risks connected to privacy, security, and service quality (see 1442 Section 20). Servers MAY reject questionable requests (even though 1443 they consist of well-formed XML), for instance with a 400 (Bad 1444 Request) status code and an optional response body explaining the 1445 problem. 1447 8.3. URL Handling 1449 URLs appear in many places in requests and responses. 1450 Interoperability experience with [RFC2518] showed that many clients 1451 parsing Multi-Status responses did not fully implement the full 1452 Reference Resolution defined in Section 5 of [RFC3986]. Thus, 1453 servers in particular need to be careful in handling URLs in 1454 responses, to ensure that clients have enough context to be able to 1455 interpret all the URLs. The rules in this section apply not only to 1456 resource URLs in the 'href' element in Multi-Status responses, but 1457 also to the Destination and If header resource URLs. 1459 The sender has a choice between two approaches: using a relative 1460 reference, which is resolved against the Request-URI, or a full URI. 1461 A server MUST ensure that every 'href' value within a Multi-Status 1462 response uses the same format. 1464 WebDAV only uses one form of relative reference in its extensions, 1465 the absolute path. 1467 Simple-ref = absolute-URI | ( path-absolute [ "?" query ] ) 1469 The absolute-URI, path-absolute and query productions are defined in 1470 Section 4.3, 3.3 and 3.4 of [RFC3986]. 1472 Within Simple-ref productions, senders MUST NOT: 1474 o use dot-segments ("." or ".."), or 1476 o have prefixes that do not match the Request-URI (using the 1477 comparison rules defined in Section 3.2.3 of [RFC2616]). 1479 Identifiers for collections SHOULD end in a '/' character. 1481 8.3.1. Example - Correct URL Handling 1483 Consider the collection http://example.com/sample/ with the internal 1484 member URL http://example.com/sample/a%20test and the PROPFIND 1485 request below: 1487 >>Request: 1489 PROPFIND /sample/ HTTP/1.1 1490 Host: example.com 1491 Depth: 1 1493 In this case, the server should return two 'href' elements containing 1494 either 1495 o 'http://example.com/sample/' and 1496 'http://example.com/sample/a%20test', or 1498 o '/sample/' and '/sample/a%20test' 1500 Note that even though the server may be storing the member resource 1501 internally as 'a test', it has to be percent-encoded when used inside 1502 a URI reference (see Section 2.1 of [RFC3986]). Also note that a 1503 legal URI may still contain characters that need to be escaped within 1504 XML character data, such as the ampersand character. 1506 8.4. Required Bodies in Requests 1508 Some of these new methods do not define bodies. Servers MUST examine 1509 all requests for a body, even when a body was not expected. In cases 1510 where a request body is present but would be ignored by a server, the 1511 server MUST reject the request with 415 (Unsupported Media Type). 1512 This informs the client (which may have been attempting to use an 1513 extension) that the body could not be processed as the client 1514 intended. 1516 8.5. HTTP Headers for use in WebDAV 1518 HTTP defines many headers that can be used in WebDAV requests and 1519 responses. Not all of these are appropriate in all situations and 1520 some interactions may be undefined. Note that HTTP 1.1 requires the 1521 Date header in all responses if possible (see Section 14.18, 1522 [RFC2616]). 1524 The server MUST do authorization checks before checking any HTTP 1525 conditional header. 1527 8.6. ETag 1529 HTTP 1.1 recommends the use of ETags rather than modification dates, 1530 for cache-control, and there are even stronger reasons to prefer 1531 ETags for authoring. Correct use of ETags is even more important in 1532 a distributed authoring environment, because ETags are necessary 1533 along with locks to avoid the lost-update problem. A client might 1534 fail to renew a lock, for example when the lock times out and the 1535 client is accidentally offline or in the middle of a long upload. 1536 When a client fails to renew the lock, it's quite possible the 1537 resource can still be relocked and the user can go on editing, as 1538 long as no changes were made in the meantime. ETags are required for 1539 the client to be able to distinguish this case. Otherwise, the 1540 client is forced to ask the user whether to overwrite the resource on 1541 the server without even being able to tell the user whether it has 1542 changed. Timestamps do not solve this problem nearly as well as 1543 ETags. 1545 Strong ETags are much more useful for authoring use cases than weak 1546 ETags. Semantic equivalence can be a useful concept but that depends 1547 on the document type and the application type, and interoperability 1548 might require some agreement or standard outside the scope of this 1549 specification and HTTP. Note also that weak ETags have certain 1550 restrictions in HTTP, e.g. these cannot be used in If-Match headers. 1552 Note that the meaning of an ETag in a PUT response is not clearly 1553 defined either in this document or in RFC2616 (i.e., whether the ETag 1554 means that the resource is octet-for-octet equivalent to the body of 1555 the PUT request, or whether the server could have made minor changes 1556 in the formatting or content of the document upon storage). This is 1557 an HTTP issue, not purely a WebDAV issue, and is being addressed in 1558 [I-D.draft-whitehead-http-etag]. 1560 Because clients may be forced to prompt users or throw away changed 1561 content if the ETag changes, a WebDAV server SHOULD NOT change the 1562 ETag (or the Last-Modified time) for a resource that has an unchanged 1563 body and location. The ETag represents the state of the body or 1564 contents of the resource. There is no similar way to tell if 1565 properties have changed. 1567 8.7. Including error response bodies 1569 HTTP and WebDAV did not use the bodies of most error responses for 1570 machine-parsable information until DeltaV introduced a mechanism to 1571 include more specific information in the body of an error response 1572 (Section 1.6 of [RFC3253]). The error body mechanism is appropriate 1573 to use with any error response that may take a body but does not 1574 already have a body defined. The mechanism is particularly 1575 appropriate when a status code can mean many things (for example, 400 1576 Bad Request can mean required headers are missing, headers are 1577 incorrectly formatted, or much more). This error body mechanism is 1578 covered in Section 16. 1580 8.8. Impact of Namespace Operations on Cache Validators 1582 Note that the HTTP response headers "Etag" and "Last-Modified" (see 1583 [RFC2616], Sections 14.19 and 14.29) are defined per URL (not per 1584 resource), and are used by clients for caching. Therefore servers 1585 must ensure that executing any operation that affects the URL 1586 namespace (such as COPY, MOVE, DELETE, PUT or MKCOL) does preserve 1587 their semantics, in particular: 1589 o For any given URL, the "Last-Modified" value MUST increment every 1590 time the representation returned upon GET changes (within the 1591 limits of timestamp resolution). 1593 o For any given URL, an "ETag" value MUST NOT be re-used for 1594 different representations returned by GET. 1596 In practice this means that servers 1598 o might have to increment "Last-Modified" timestamps for every 1599 resource inside the destination namespace of a namespace operation 1600 unless it can do so more selectively, and 1602 o similarily, might have to re-assign "ETag" values for these 1603 resources (unless the server allocates entity tags in a way so 1604 that they are unique across the whole URL namespace managed by the 1605 server). 1607 Note that these considerations also apply to specific use cases, such 1608 as using PUT to create a new resource at a URL that has been mapped 1609 before, but has been deleted since then. 1611 Finally, WebDAV properties (such as DAV:getetag and DAV: 1612 getlastmodified) that inherit their semantics from HTTP headers must 1613 behave accordingly. 1615 9. HTTP Methods for Distributed Authoring 1617 9.1. PROPFIND Method 1619 The PROPFIND method retrieves properties defined on the resource 1620 identified by the Request-URI, if the resource does not have any 1621 internal members, or on the resource identified by the Request-URI 1622 and potentially its member resources, if the resource is a collection 1623 that has internal member URLs. All DAV compliant resources MUST 1624 support the PROPFIND method and the propfind XML element 1625 (Section 14.20) along with all XML elements defined for use with that 1626 element. 1628 A client MUST submit a Depth header with a value of "0", "1", or 1629 "infinity" with a PROPFIND request. Servers MUST support "0" and "1" 1630 depth requests on WebDAV-compliant resources and SHOULD support 1631 "infinity" requests. In practice, support for depth infinity 1632 requests MAY be disabled, due to the performance and security 1633 concerns associated with this behavior. Since clients weren't 1634 required to include the Depth header in [RFC2518], servers SHOULD 1635 treat such a request as if a "Depth: infinity" header was included. 1637 A client may submit a 'propfind' XML element in the body of the 1638 request method describing what information is being requested. It is 1639 possible to: 1641 o Request particular property values, by naming the properties 1642 desired within the 'prop' element (the ordering of properties in 1643 here MAY be ignored by server), 1645 o Request property values for those properties defined in this 1646 specification plus dead properties, by using the 'allprop' element 1647 (the 'include' element can be used with 'allprop' to instruct the 1648 server to also include additional live properties that may not 1649 have been returned otherwise), 1651 o Request a list of names of all the properties defined on the 1652 resource, by using the 'propname' element. 1654 A client may choose not to submit a request body. An empty PROPFIND 1655 request body MUST be treated as if it were an 'allprop' request. 1657 Note that 'allprop' does not return values for all live properties. 1658 WebDAV servers increasingly have expensively-calculated or lengthy 1659 properties (see [RFC3253] and [RFC3744]) and do not return all 1660 properties already. Instead, WebDAV clients can use propname 1661 requests to discover what live properties exist, and request named 1662 properties when retrieving values. For a live property defined 1663 elsewhere, that definition can specify whether that live property 1664 would be returned in 'allprop' requests or not. 1666 All servers MUST support returning a response of content type text/ 1667 xml or application/xml that contains a multistatus XML element that 1668 describes the results of the attempts to retrieve the various 1669 properties. 1671 If there is an error retrieving a property then a proper error result 1672 MUST be included in the response. A request to retrieve the value of 1673 a property which does not exist is an error and MUST be noted with a 1674 'response' XML element which contains a 404 (Not Found) status value. 1676 Consequently, the 'multistatus' XML element for a collection resource 1677 MUST include a 'response' XML element for each member URL of the 1678 collection, to whatever depth was requested. It SHOULD NOT include 1679 any 'response' elements for resources that are not WebDAV-compliant. 1680 Each 'response' element MUST contain an 'href' element that contains 1681 the URL of the resource on which the properties in the prop XML 1682 element are defined. Results for a PROPFIND on a collection resource 1683 are returned as a flat list whose order of entries is not 1684 significant. Note that a resource may have only one value for a 1685 property of a given name, so the property may only show up once in 1686 PROPFIND responses. 1688 Properties may be subject to access control. In the case of 1689 'allprop' and 'propname' requests, if a principal does not have the 1690 right to know whether a particular property exists then the property 1691 MAY be silently excluded from the response. 1693 Some PROPFIND results MAY be cached, with care as there is no cache 1694 validation mechanism for most properties. This method is both safe 1695 and idempotent (see Section 9.1 of [RFC2616]). 1697 9.1.1. PROPFIND status codes 1699 This section, as with similar sections for other methods, provides 1700 some guidance on error codes and preconditions or postconditions 1701 (defined in Section 16) that might be particularly useful with 1702 PROPFIND. 1704 403 Forbidden - A server MAY reject PROPFIND requests on collections 1705 with depth header of "Infinity", in which case it SHOULD use this 1706 error with the precondition code 'propfind-finite-depth' inside the 1707 error body. 1709 9.1.2. Status Codes for use in 'propstat' Element 1711 In PROPFIND responses, information about individual properties is 1712 returned inside 'propstat' elements (see Section 14.22), each 1713 containing an individual 'status' element containing information 1714 about the properties appearing in it. The list below summarizes the 1715 most common status codes used inside 'propstat', however clients 1716 should be prepared to handle other 2/3/4/5xx series status codes as 1717 well. 1719 200 OK - A property exists and/or its value is successfully returned. 1721 401 Unauthorized - The property cannot be viewed without appropriate 1722 authorization. 1724 403 Forbidden - The property cannot be viewed regardless of 1725 authentication. 1727 404 Not Found - The property does not exist. 1729 9.1.3. Example - Retrieving Named Properties 1731 >>Request 1733 PROPFIND /file HTTP/1.1 1734 Host: www.example.com 1735 Content-type: application/xml; charset="utf-8" 1736 Content-Length: xxxx 1738 1739 1740 1741 1742 1743 1744 1745 1746 1748 >>Response 1750 HTTP/1.1 207 Multi-Status 1751 Content-Type: application/xml; charset="utf-8" 1752 Content-Length: xxxx 1754 1755 1756 1757 http://www.example.com/file 1758 1759 1760 1761 Box type A 1762 1763 1764 J.J. Johnson 1765 1766 1767 HTTP/1.1 200 OK 1768 1769 1770 1771 HTTP/1.1 403 Forbidden 1772 The user does not have access to the 1773 DingALing property. 1774 1775 1776 1777 There has been an access violation error. 1778 1779 1781 In this example, PROPFIND is executed on a non-collection resource 1782 http://www.example.com/file. The propfind XML element specifies the 1783 name of four properties whose values are being requested. In this 1784 case only two properties were returned, since the principal issuing 1785 the request did not have sufficient access rights to see the third 1786 and fourth properties. 1788 9.1.4. Example - Using so-called 'allprop' 1790 >>Request 1792 PROPFIND /mycol/ HTTP/1.1 1793 Host: www.example.com 1794 Depth: 1 1795 Content-Type: application/xml; charset="utf-8" 1796 Content-Length: xxxx 1798 1799 1800 1801 1802 1803 1804 1805 1807 In this example, PROPFIND is executed on the resource 1808 http://www.example.com/mycol/ and its internal member resources. The 1809 client requests the values of all live properties defined in this 1810 specification, plus all dead properties, plus two more live 1811 properties defined in [RFC3253]. The response is not shown. 1813 9.1.5. Example - Using 'propname' to Retrieve all Property Names 1815 >>Request 1817 PROPFIND /container/ HTTP/1.1 1818 Host: www.example.com 1819 Content-Type: application/xml; charset="utf-8" 1820 Content-Length: xxxx 1822 1823 1824 1825 1827 >>Response 1829 HTTP/1.1 207 Multi-Status 1830 Content-Type: application/xml; charset="utf-8" 1831 Content-Length: xxxx 1833 1834 1835 1836 http://www.example.com/container/ 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 HTTP/1.1 200 OK 1847 1848 1849 1850 http://www.example.com/container/front.html 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 HTTP/1.1 200 OK 1864 1865 1866 1868 In this example, PROPFIND is invoked on the collection resource 1869 http://www.example.com/container/, with a propfind XML element 1870 containing the propname XML element, meaning the name of all 1871 properties should be returned. Since no Depth header is present, it 1872 assumes its default value of "infinity", meaning the name of the 1873 properties on the collection and all its descendents should be 1874 returned. 1876 Consistent with the previous example, resource 1877 http://www.example.com/container/ has six properties defined on it: 1878 bigbox and author in the "http://ns.example.com/boxschema/" 1879 namespace, and creationdate, displayname, resourcetype, and 1880 supportedlock in the "DAV:" namespace. 1882 The resource http://www.example.com/container/index.html, a member of 1883 the "container" collection, has nine properties defined on it, bigbox 1884 in the "http://ns.example.com/boxschema/" namespace and, 1885 creationdate, displayname, getcontentlength, getcontenttype, getetag, 1886 getlastmodified, resourcetype, and supportedlock in the "DAV:" 1887 namespace. 1889 This example also demonstrates the use of XML namespace scoping and 1890 the default namespace. Since the "xmlns" attribute does not contain 1891 a prefix, the namespace applies by default to all enclosed elements. 1892 Hence, all elements which do not explicitly state the namespace to 1893 which they belong are members of the "DAV:" namespace. 1895 9.1.6. Example - Using 'allprop' 1897 Note that 'allprop', despite its name which remains for backward- 1898 compatibility, does not return every property, but only dead 1899 properties and the live properties defined in this specification. 1901 >>Request 1903 PROPFIND /container/ HTTP/1.1 1904 Host: www.example.com 1905 Depth: 1 1906 Content-Type: application/xml; charset="utf-8" 1907 Content-Length: xxxx 1909 1910 1911 1912 1914 >>Response 1916 HTTP/1.1 207 Multi-Status 1917 Content-Type: application/xml; charset="utf-8" 1918 Content-Length: xxxx 1920 1921 1922 1923 /container/ 1924 1925 1926 Box type A 1927 Hadrian 1928 1997-12-01T17:42:21-08:00 1929 Example collection 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 HTTP/1.1 200 OK 1943 1944 1945 1946 /container/front.html 1947 1948 1949 Box type B 1950 1951 1997-12-01T18:27:21-08:00 1952 Example HTML resource 1953 4525 1954 text/html 1955 "zzyzx" 1956 Mon, 12 Jan 1998 09:25:56 GMT 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 HTTP/1.1 200 OK 1972 1973 1974 1976 In this example, PROPFIND was invoked on the resource 1977 http://www.example.com/container/ with a Depth header of 1, meaning 1978 the request applies to the resource and its children, and a propfind 1979 XML element containing the allprop XML element, meaning the request 1980 should return the name and value of all the dead properties defined 1981 on the resources, plus the name and value of all the properties 1982 defined in this specification. This example illustrates the use of 1983 relative references in the 'href' elements of the response. 1985 The resource http://www.example.com/container/ has six properties 1986 defined on it: 'bigbox' and 'author in the 1987 "http://ns.example.com/boxschema/" namespace, DAV:creationdate, DAV: 1988 displayname, DAV:resourcetype, and DAV:supportedlock. 1990 The last four properties are WebDAV-specific, defined in Section 15. 1991 Since GET is not supported on this resource, the get* properties 1992 (e.g., DAV:getcontentlength) are not defined on this resource. The 1993 WebDAV-specific properties assert that "container" was created on 1994 December 1, 1997, at 5:42:21PM, in a time zone 8 hours west of GMT 1995 (DAV:creationdate), has a name of "Example collection" (DAV: 1996 displayname), a collection resource type (DAV:resourcetype), and 1997 supports exclusive write and shared write locks (DAV:supportedlock). 1999 The resource http://www.example.com/container/front.html has nine 2000 properties defined on it: 2002 'bigbox' in the "http://ns.example.com/boxschema/" namespace (another 2003 instance of the "bigbox" property type), DAV:creationdate, DAV: 2004 displayname, DAV:getcontentlength, DAV:getcontenttype, DAV:getetag, 2005 DAV:getlastmodified, DAV:resourcetype, and DAV:supportedlock. 2007 The DAV-specific properties assert that "front.html" was created on 2008 December 1, 1997, at 6:27:21PM, in a time zone 8 hours west of GMT 2009 (DAV:creationdate), has a name of "Example HTML resource" (DAV: 2010 displayname), a content length of 4525 bytes (DAV:getcontentlength), 2011 a MIME type of "text/html" (DAV:getcontenttype), an entity tag of 2012 "zzyzx" (DAV:getetag), was last modified on Monday, January 12, 1998, 2013 at 09:25:56 GMT (DAV:getlastmodified), has an empty resource type, 2014 meaning that it is not a collection (DAV:resourcetype), and supports 2015 both exclusive write and shared write locks (DAV:supportedlock). 2017 9.2. PROPPATCH Method 2019 The PROPPATCH method processes instructions specified in the request 2020 body to set and/or remove properties defined on the resource 2021 identified by the Request-URI. 2023 All DAV compliant resources MUST support the PROPPATCH method and 2024 MUST process instructions that are specified using the 2025 propertyupdate, set, and remove XML elements. Execution of the 2026 directives in this method is, of course, subject to access control 2027 constraints. DAV compliant resources SHOULD support the setting of 2028 arbitrary dead properties. 2030 The request message body of a PROPPATCH method MUST contain the 2031 propertyupdate XML element. 2033 Servers MUST process PROPPATCH instructions in document order (an 2034 exception to the normal rule that ordering is irrelevant). 2035 Instructions MUST either all be executed or none executed. Thus if 2036 any error occurs during processing all executed instructions MUST be 2037 undone and a proper error result returned. Instruction processing 2038 details can be found in the definition of the set and remove 2039 instructions in Section 14.23 and Section 14.26. 2041 If a server attempts to make any of the property changes in a 2042 PROPPATCH request (i.e. the request is not rejected for high-level 2043 errors before processing the body), the response MUST be a Multi- 2044 Status response (Section 13). 2046 This method is idempotent, but not safe (see Section 9.1 of 2047 [RFC2616]). Responses to this method MUST NOT be cached. 2049 9.2.1. Status Codes for use in 'propstat' Element 2051 In PROPPATCH responses, information about individual properties is 2052 returned inside 'propstat' elements (see Section 14.22), each 2053 containing an individual 'status' element containing information 2054 about the properties appearing in it. The list below summarizes the 2055 most common status codes used inside 'propstat', however clients 2056 should be prepared to handle other 2/3/4/5xx series status codes as 2057 well. 2059 200 (OK) - The property set or change succeeded. Note that if this 2060 appears for one property, it appears for every property in the 2061 response, due to the atomicity of PROPPATCH. 2063 403 (Forbidden) - The client, for reasons the server chooses not to 2064 specify, cannot alter one of the properties. 2066 403 (Forbidden): The client has attempted to set a protected 2067 property, such as DAV:getetag. If returning this error, the server 2068 SHOULD use the precondition code 'cannot-modify-protected-property' 2069 inside the response body. 2071 409 (Conflict) - The client has provided a value whose semantics are 2072 not appropriate for the property. 2074 424 (Failed Dependency) - The property change could not be made 2075 because of another property change that failed. 2077 507 (Insufficient Storage) - The server did not have sufficient space 2078 to record the property. 2080 9.2.2. Example - PROPPATCH 2082 >>Request 2084 PROPPATCH /bar.html HTTP/1.1 2085 Host: www.example.com 2086 Content-Type: application/xml; charset="utf-8" 2087 Content-Length: xxxx 2089 2090 2092 2093 2094 2095 Jim Whitehead 2096 Roy Fielding 2097 2098 2099 2100 2101 2102 2103 2105 >>Response 2107 HTTP/1.1 207 Multi-Status 2108 Content-Type: application/xml; charset="utf-8" 2109 Content-Length: xxxx 2111 2112 2114 2115 http://www.example.com/bar.html 2116 2117 2118 HTTP/1.1 424 Failed Dependency 2119 2120 2121 2122 HTTP/1.1 409 Conflict 2123 2124 Copyright Owner can not be deleted or 2125 altered. 2126 2127 2129 In this example, the client requests the server to set the value of 2130 the "Authors" property in the 2131 "http://ns.example.com/standards/z39.50/" namespace, and to remove 2132 the property "Copyright-Owner" in the same namespace. Since the 2133 Copyright-Owner property could not be removed, no property 2134 modifications occur. The 424 (Failed Dependency) status code for the 2135 Authors property indicates this action would have succeeded if it 2136 were not for the conflict with removing the Copyright-Owner property. 2138 9.3. MKCOL Method 2140 MKCOL creates a new collection resource at the location specified by 2141 the Request-URI. If the Request-URI is already mapped to a resource 2142 then the MKCOL MUST fail. During MKCOL processing, a server MUST 2143 make the Request-URI an internal member of its parent collection, 2144 unless the Request-URI is "/". If no such ancestor exists, the 2145 method MUST fail. When the MKCOL operation creates a new collection 2146 resource, all ancestors MUST already exist, or the method MUST fail 2147 with a 409 (Conflict) status code. For example, if a request to 2148 create collection /a/b/c/d/ is made, and /a/b/c/ does not exist, the 2149 request must fail. 2151 When MKCOL is invoked without a request body, the newly created 2152 collection SHOULD have no members. 2154 A MKCOL request message may contain a message body. The precise 2155 behavior of a MKCOL request when the body is present is undefined, 2156 but limited to creating collections, members of a collection, bodies 2157 of members and properties on the collections or members. If the 2158 server receives a MKCOL request entity type it does not support or 2159 understand it MUST respond with a 415 (Unsupported Media Type) status 2160 code. If the server decides to reject the request based on the 2161 presence of an entity or the type of an entity, it should use the 415 2162 (Unsupported Media Type) status code. 2164 This method is idempotent, but not safe (see Section 9.1 of 2165 [RFC2616]). Responses to this method MUST NOT be cached. 2167 9.3.1. MKCOL Status Codes 2169 In addition to the general status codes possible, the following 2170 status codes have specific applicability to MKCOL: 2172 201 (Created) - The collection was created. 2174 403 (Forbidden) - This indicates at least one of two conditions: 1) 2175 the server does not allow the creation of collections at the given 2176 location in its URL namespace, or 2) the parent collection of the 2177 Request-URI exists but cannot accept members. 2179 405 (Method Not Allowed) - MKCOL can only be executed on an unmapped 2180 URL. 2182 409 (Conflict) - A collection cannot be made at the Request-URI until 2183 one or more intermediate collections have been created. The server 2184 MUST NOT create those intermediate collections automatically. 2186 415 (Unsupported Media Type) - The server does not support the 2187 request body type (although bodies are legal on MKCOL requests, since 2188 this specification doesn't define any, the server is likely not to 2189 support any given body type). 2191 507 (Insufficient Storage) - The resource does not have sufficient 2192 space to record the state of the resource after the execution of this 2193 method. 2195 9.3.2. Example - MKCOL 2197 This example creates a collection called /webdisc/xfiles/ on the 2198 server www.example.com. 2200 >>Request 2202 MKCOL /webdisc/xfiles/ HTTP/1.1 2203 Host: www.example.com 2205 >>Response 2207 HTTP/1.1 201 Created 2209 9.4. GET, HEAD for Collections 2211 The semantics of GET are unchanged when applied to a collection, 2212 since GET is defined as, "retrieve whatever information (in the form 2213 of an entity) is identified by the Request-URI" [RFC2616]. GET when 2214 applied to a collection may return the contents of an "index.html" 2215 resource, a human-readable view of the contents of the collection, or 2216 something else altogether. Hence it is possible that the result of a 2217 GET on a collection will bear no correlation to the membership of the 2218 collection. 2220 Similarly, since the definition of HEAD is a GET without a response 2221 message body, the semantics of HEAD are unmodified when applied to 2222 collection resources. 2224 9.5. POST for Collections 2226 Since by definition the actual function performed by POST is 2227 determined by the server and often depends on the particular 2228 resource, the behavior of POST when applied to collections cannot be 2229 meaningfully modified because it is largely undefined. Thus the 2230 semantics of POST are unmodified when applied to a collection. 2232 9.6. DELETE Requirements 2234 DELETE is defined in [RFC2616], Section 9.7, to "delete the resource 2235 identified by the Request-URI". However, WebDAV changes some DELETE 2236 handling requirements. 2238 A server processing a successful DELETE request: 2240 MUST destroy locks rooted on the deleted resource 2242 MUST remove the mapping from the Request-URI to any resource. 2244 Thus, after a successful DELETE operation (and in the absence of 2245 other actions) a subsequent GET/HEAD/PROPFIND request to the target 2246 Request-URI MUST return 404 (Not Found). 2248 9.6.1. DELETE for Collections 2250 The DELETE method on a collection MUST act as if a "Depth: infinity" 2251 header was used on it. A client MUST NOT submit a Depth header with 2252 a DELETE on a collection with any value but infinity. 2254 DELETE instructs that the collection specified in the Request-URI and 2255 all resources identified by its internal member URLs are to be 2256 deleted. 2258 If any resource identified by a member URL cannot be deleted then all 2259 of the member's ancestors MUST NOT be deleted, so as to maintain URL 2260 namespace consistency. 2262 Any headers included with DELETE MUST be applied in processing every 2263 resource to be deleted. 2265 When the DELETE method has completed processing it MUST result in a 2266 consistent URL namespace. 2268 If an error occurs deleting a member resource (a resource other than 2269 the resource identified in the Request-URI) then the response can be 2270 a 207 (Multi-Status). Multi-Status is used here to indicate which 2271 internal resources could NOT be deleted, including an error code 2272 which should help the client understand which resources caused the 2273 failure. For example, the Multi-Status body could include a response 2274 with status 423 (Locked) if an internal resource was locked. 2276 The server MAY return a 4xx status response, rather than a 207, if 2277 the request failed completely. 2279 424 (Failed Dependency) status codes SHOULD NOT be in the 207 (Multi- 2280 Status) response for DELETE. They can be safely left out because the 2281 client will know that the ancestors of a resource could not be 2282 deleted when the client receives an error for the ancestor's progeny. 2283 Additionally 204 (No Content) errors SHOULD NOT be returned in the 2284 207 (Multi-Status). The reason for this prohibition is that 204 (No 2285 Content) is the default success code. 2287 9.6.2. Example - DELETE 2289 >>Request 2291 DELETE /container/ HTTP/1.1 2292 Host: www.example.com 2294 >>Response 2296 HTTP/1.1 207 Multi-Status 2297 Content-Type: application/xml; charset="utf-8" 2298 Content-Length: xxxx 2300 2301 2302 2303 http://www.example.com/container/resource3 2304 HTTP/1.1 423 Locked 2305 2306 2307 2309 In this example the attempt to delete 2310 http://www.example.com/container/resource3 failed because it is 2311 locked, and no lock token was submitted with the request. 2312 Consequently, the attempt to delete http://www.example.com/container/ 2313 also failed. Thus the client knows that the attempt to delete 2314 http://www.example.com/container/ must have also failed since the 2315 parent can not be deleted unless its child has also been deleted. 2316 Even though a Depth header has not been included, a depth of infinity 2317 is assumed because the method is on a collection. 2319 9.7. PUT Requirements 2321 9.7.1. PUT for Non-Collection Resources 2323 A PUT performed on an existing resource replaces the GET response 2324 entity of the resource. Properties defined on the resource may be 2325 recomputed during PUT processing but are not otherwise affected. For 2326 example, if a server recognizes the content type of the request body, 2327 it may be able to automatically extract information that could be 2328 profitably exposed as properties. 2330 A PUT that would result in the creation of a resource without an 2331 appropriately scoped parent collection MUST fail with a 409 2332 (Conflict). 2334 A PUT request allows a client to indicate what media type an entity 2335 body has, and whether it should change if overwritten. Thus, a 2336 client SHOULD provide a Content-Type for a new resource if any is 2337 known. If the client does not provide a Content-Type for a new 2338 resource, the server MAY create a resource with no Content-Type 2339 assigned, or it MAY attempt to assign a Content-Type. 2341 Note that although a recipient ought generally to treat metadata 2342 supplied with an HTTP request as authoritative, in practice there's 2343 no guarantee that a server will accept client-supplied metadata (e.g. 2344 any request header beginning with "Content-"). Many servers do not 2345 allow configuring the Content-Type on a per-resource basis in the 2346 first place. Thus, clients can't always rely on the ability to 2347 directly influence the content type by including a Content-Type 2348 request header. 2350 9.7.2. PUT for Collections 2352 This specification does not define the behavior of the PUT method for 2353 existing collections. A PUT request to an existing collection MAY be 2354 treated as an error (405 Method Not Allowed). 2356 The MKCOL method is defined to create collections. 2358 9.8. COPY Method 2360 The COPY method creates a duplicate of the source resource identified 2361 by the Request-URI, in the destination resource identified by the URI 2362 in the Destination header. The Destination header MUST be present. 2363 The exact behavior of the COPY method depends on the type of the 2364 source resource. 2366 All WebDAV compliant resources MUST support the COPY method. 2367 However, support for the COPY method does not guarantee the ability 2368 to copy a resource. For example, separate programs may control 2369 resources on the same server. As a result, it may not be possible to 2370 copy a resource to a location that appears to be on the same server. 2372 This method is idempotent, but not safe (see Section 9.1 of 2373 [RFC2616]). Responses to this method MUST NOT be cached. 2375 9.8.1. COPY for Non-collection Resources 2377 When the source resource is not a collection the result of the COPY 2378 method is the creation of a new resource at the destination whose 2379 state and behavior match that of the source resource as closely as 2380 possible. Since the environment at the destination may be different 2381 than at the source due to factors outside the scope of control of the 2382 server, such as the absence of resources required for correct 2383 operation, it may not be possible to completely duplicate the 2384 behavior of the resource at the destination. Subsequent alterations 2385 to the destination resource will not modify the source resource. 2386 Subsequent alterations to the source resource will not modify the 2387 destination resource. 2389 9.8.2. COPY for Properties 2391 After a successful COPY invocation, all dead properties on the source 2392 resource SHOULD be duplicated on the destination resource. Live 2393 properties described in this document SHOULD be duplicated as 2394 identically behaving live properties at the destination resource, but 2395 not necessarily with the same values. Servers SHOULD NOT convert 2396 live properties into dead properties on the destination resource, 2397 because clients may then draw incorrect conclusions about the state 2398 or functionality of a resource. Note that some live properties are 2399 defined such that the absence of the property has a specific meaning 2400 (e.g. a flag with one meaning if present and the opposite if absent), 2401 and in these cases, a successful COPY might result in the property 2402 being reported as "Not Found" in subsequent requests. 2404 When the destination is an unmapped URL, a COPY operation creates a 2405 new resource much like a PUT operation does. Live properties which 2406 are related to resource creation (such as DAV:creationdate) should 2407 have their values set accordingly. 2409 9.8.3. COPY for Collections 2411 The COPY method on a collection without a Depth header MUST act as if 2412 a Depth header with value "infinity" was included. A client may 2413 submit a Depth header on a COPY on a collection with a value of "0" 2414 or "infinity". Servers MUST support the "0" and "infinity" Depth 2415 header behaviors on WebDAV-compliant resources. 2417 A COPY of depth infinity instructs that the collection resource 2418 identified by the Request-URI is to be copied to the location 2419 identified by the URI in the Destination header, and all its internal 2420 member resources are to be copied to a location relative to it, 2421 recursively through all levels of the collection hierarchy. Note 2422 that a depth infinity COPY of /A/ into /A/B/ could lead to infinite 2423 recursion if not handled correctly. 2425 A COPY of "Depth: 0" only instructs that the collection and its 2426 properties but not resources identified by its internal member URLs, 2427 are to be copied. 2429 Any headers included with a COPY MUST be applied in processing every 2430 resource to be copied with the exception of the Destination header. 2432 The Destination header only specifies the destination URI for the 2433 Request-URI. When applied to members of the collection identified by 2434 the Request-URI the value of Destination is to be modified to reflect 2435 the current location in the hierarchy. So, if the Request-URI is /a/ 2436 with Host header value http://example.com/ and the Destination is 2437 http://example.com/b/ then when http://example.com/a/c/d is processed 2438 it must use a Destination of http://example.com/b/c/d. 2440 When the COPY method has completed processing it MUST have created a 2441 consistent URL namespace at the destination (see Section 5.1 for the 2442 definition of namespace consistency). However, if an error occurs 2443 while copying an internal collection, the server MUST NOT copy any 2444 resources identified by members of this collection (i.e., the server 2445 must skip this subtree), as this would create an inconsistent 2446 namespace. After detecting an error, the COPY operation SHOULD try 2447 to finish as much of the original copy operation as possible (i.e., 2448 the server should still attempt to copy other subtrees and their 2449 members, that are not descendents of an error-causing collection). 2451 So, for example, if an infinite depth copy operation is performed on 2452 collection /a/, which contains collections /a/b/ and /a/c/, and an 2453 error occurs copying /a/b/, an attempt should still be made to copy 2454 /a/c/. Similarly, after encountering an error copying a non- 2455 collection resource as part of an infinite depth copy, the server 2456 SHOULD try to finish as much of the original copy operation as 2457 possible. 2459 If an error in executing the COPY method occurs with a resource other 2460 than the resource identified in the Request-URI then the response 2461 MUST be a 207 (Multi-Status), and the URL of the resource causing the 2462 failure MUST appear with the specific error. 2464 The 424 (Failed Dependency) status code SHOULD NOT be returned in the 2465 207 (Multi-Status) response from a COPY method. These responses can 2466 be safely omitted because the client will know that the progeny of a 2467 resource could not be copied when the client receives an error for 2468 the parent. Additionally 201 (Created)/204 (No Content) status codes 2469 SHOULD NOT be returned as values in 207 (Multi-Status) responses from 2470 COPY methods. They, too, can be safely omitted because they are the 2471 default success codes. 2473 9.8.4. COPY and Overwriting Destination Resources 2475 If a COPY request has an Overwrite header with a value of "F", and a 2476 resource exists at the Destination URL, the server MUST fail the 2477 request. 2479 When a server executes a COPY request and overwrites a destination 2480 resource, the exact behavior MAY depend on many factors, including 2481 WebDAV extension capabilities (see particularly [RFC3253]). For 2482 example, when an ordinary resource is overwritten, the server could 2483 delete the target resource before doing the copy, or could do an in- 2484 place overwrite to preserve live properties. 2486 When a collection is overwritten, the membership of the destination 2487 collection after the successful COPY request MUST be the same 2488 membership as the source collection immediately before the COPY. 2489 Thus, merging the membership of the source and destination 2490 collections together in the destination is not a compliant behavior. 2492 In general, if clients require the state of the destination URL to be 2493 wiped out prior to a COPY (e.g. to force live properties to be 2494 reset), then the client could send a DELETE to the destination before 2495 the COPY request to ensure this reset. 2497 9.8.5. Status Codes 2499 In addition to the general status codes possible, the following 2500 status codes have specific applicability to COPY: 2502 201 (Created) - The source resource was successfully copied. The 2503 COPY operation resulted in the creation of a new resource. 2505 204 (No Content) - The source resource was successfully copied to a 2506 pre-existing destination resource. 2508 207 (Multi-Status) - Multiple resources were to be affected by the 2509 COPY, but errors on some of them prevented the operation from taking 2510 place. Specific error messages, together with the most appropriate 2511 of the source and destination URLs, appear in the body of the multi- 2512 status response. E.g. if a destination resource was locked and could 2513 not be overwritten, then the destination resource URL appears with 2514 the 423 (Locked) status. 2516 403 (Forbidden) - The operation is forbidden. A special case for 2517 COPY could be that the source and destination resources are the same 2518 resource. 2520 409 (Conflict) - A resource cannot be created at the destination 2521 until one or more intermediate collections have been created. The 2522 server MUST NOT create those intermediate collections automatically. 2524 412 (Precondition Failed) - A precondition header check failed, e.g. 2525 the Overwrite header is "F" and the destination URL is already mapped 2526 to a resource. 2528 423 (Locked) - The destination resource, or resource within the 2529 destination collection, was locked. This response SHOULD contain the 2530 'lock-token-submitted' precondition element. 2532 502 (Bad Gateway) - This may occur when the destination is on another 2533 server, repository or URL namespace. Either the source namespace 2534 does not support copying to the destination namespace, or the 2535 destination namespace refuses to accept the resource. The client may 2536 wish to try GET/PUT and PROPFIND/PROPPATCH instead. 2538 507 (Insufficient Storage) - The destination resource does not have 2539 sufficient space to record the state of the resource after the 2540 execution of this method. 2542 9.8.6. Example - COPY with Overwrite 2544 This example shows resource 2545 http://www.example.com/~fielding/index.html being copied to the 2546 location http://www.example.com/users/f/fielding/index.html. The 204 2547 (No Content) status code indicates the existing resource at the 2548 destination was overwritten. 2550 >>Request 2552 COPY /~fielding/index.html HTTP/1.1 2553 Host: www.example.com 2554 Destination: http://www.example.com/users/f/fielding/index.html 2556 >>Response 2558 HTTP/1.1 204 No Content 2560 9.8.7. Example - COPY with No Overwrite 2562 The following example shows the same copy operation being performed, 2563 but with the Overwrite header set to "F." A response of 412 2564 (Precondition Failed) is returned because the destination URL is 2565 already mapped to a resource. 2567 >>Request 2569 COPY /~fielding/index.html HTTP/1.1 2570 Host: www.example.com 2571 Destination: http://www.example.com/users/f/fielding/index.html 2572 Overwrite: F 2574 >>Response 2576 HTTP/1.1 412 Precondition Failed 2578 9.8.8. Example - COPY of a Collection 2580 >>Request 2582 COPY /container/ HTTP/1.1 2583 Host: www.example.com 2584 Destination: http://www.example.com/othercontainer/ 2585 Depth: infinity 2587 >>Response 2589 HTTP/1.1 207 Multi-Status 2590 Content-Type: application/xml; charset="utf-8" 2591 Content-Length: xxxx 2593 2595 2596 2597 http://www.example.com/othercontainer/R2/ 2598 HTTP/1.1 423 Locked 2599 2600 2601 2603 The Depth header is unnecessary as the default behavior of COPY on a 2604 collection is to act as if a "Depth: infinity" header had been 2605 submitted. In this example most of the resources, along with the 2606 collection, were copied successfully. However the collection R2 2607 failed because the destination R2 is locked. Because there was an 2608 error copying R2, none of R2's members were copied. However no 2609 errors were listed for those members due to the error minimization 2610 rules. 2612 9.9. MOVE Method 2614 The MOVE operation on a non-collection resource is the logical 2615 equivalent of a copy (COPY), followed by consistency maintenance 2616 processing, followed by a delete of the source, where all three 2617 actions are performed in a single operation. The consistency 2618 maintenance step allows the server to perform updates caused by the 2619 move, such as updating all URLs other than the Request-URI which 2620 identify the source resource, to point to the new destination 2621 resource. 2623 The Destination header MUST be present on all MOVE methods and MUST 2624 follow all COPY requirements for the COPY part of the MOVE method. 2625 All WebDAV compliant resources MUST support the MOVE method. 2627 Support for the MOVE method does not guarantee the ability to move a 2628 resource to a particular destination. For example, separate programs 2629 may actually control different sets of resources on the same server. 2630 Therefore, it may not be possible to move a resource within a 2631 namespace that appears to belong to the same server. 2633 If a resource exists at the destination, the destination resource 2634 will be deleted as a side-effect of the MOVE operation, subject to 2635 the restrictions of the Overwrite header. 2637 This method is idempotent, but not safe (see Section 9.1 of 2638 [RFC2616]). Responses to this method MUST NOT be cached. 2640 9.9.1. MOVE for Properties 2642 Live properties described in this document SHOULD be moved along with 2643 the resource, such that the resource has identically behaving live 2644 properties at the destination resource, but not necessarily with the 2645 same values. Note that some live properties are defined such that 2646 the absence of the property has a specific meaning (e.g. a flag with 2647 one meaning if present and the opposite if absent), and in these 2648 cases, a successful MOVE might result in the property being reported 2649 as "Not Found" in subsequent requests. If the live properties will 2650 not work the same way at the destination, the server MAY fail the 2651 request. 2653 MOVE is frequently used by clients to rename a file without changing 2654 its parent collection, so it's not appropriate to reset all live 2655 properties which are set at resource creation. For example, the DAV: 2656 creationdate property value SHOULD remain the same after a MOVE. 2658 Dead properties MUST be moved along with the resource. 2660 9.9.2. MOVE for Collections 2662 A MOVE with "Depth: infinity" instructs that the collection 2663 identified by the Request-URI be moved to the address specified in 2664 the Destination header, and all resources identified by its internal 2665 member URLs are to be moved to locations relative to it, recursively 2666 through all levels of the collection hierarchy. 2668 The MOVE method on a collection MUST act as if a "Depth: infinity" 2669 header was used on it. A client MUST NOT submit a Depth header on a 2670 MOVE on a collection with any value but "infinity". 2672 Any headers included with MOVE MUST be applied in processing every 2673 resource to be moved with the exception of the Destination header. 2674 The behavior of the Destination header is the same as given for COPY 2675 on collections. 2677 When the MOVE method has completed processing it MUST have created a 2678 consistent URL namespace at both the source and destination (see 2679 section 5.1 for the definition of namespace consistency). However, 2680 if an error occurs while moving an internal collection, the server 2681 MUST NOT move any resources identified by members of the failed 2682 collection (i.e., the server must skip the error-causing subtree), as 2683 this would create an inconsistent namespace. In this case, after 2684 detecting the error, the move operation SHOULD try to finish as much 2685 of the original move as possible (i.e., the server should still 2686 attempt to move other subtrees and the resources identified by their 2687 members, that are not descendents of an error-causing collection). 2688 So, for example, if an infinite depth move is performed on collection 2689 /a/, which contains collections /a/b/ and /a/c/, and an error occurs 2690 moving /a/b/, an attempt should still be made to try moving /a/c/. 2691 Similarly, after encountering an error moving a non-collection 2692 resource as part of an infinite depth move, the server SHOULD try to 2693 finish as much of the original move operation as possible. 2695 If an error occurs with a resource other than the resource identified 2696 in the Request-URI then the response MUST be a 207 (Multi-Status), 2697 and the errored resource's URL MUST appear with the specific error. 2699 The 424 (Failed Dependency) status code SHOULD NOT be returned in the 2700 207 (Multi-Status) response from a MOVE method. These errors can be 2701 safely omitted because the client will know that the progeny of a 2702 resource could not be moved when the client receives an error for the 2703 parent. Additionally 201 (Created)/204 (No Content) responses SHOULD 2704 NOT be returned as values in 207 (Multi-Status) responses from a 2705 MOVE. These responses can be safely omitted because they are the 2706 default success codes. 2708 9.9.3. MOVE and the Overwrite Header 2710 If a resource exists at the destination and the Overwrite header is 2711 "T" then prior to performing the move the server MUST perform a 2712 DELETE with "Depth: infinity" on the destination resource. If the 2713 Overwrite header is set to "F" then the operation will fail. 2715 9.9.4. Status Codes 2717 In addition to the general status codes possible, the following 2718 status codes have specific applicability to MOVE: 2720 201 (Created) - The source resource was successfully moved, and a new 2721 URL mapping was created at the destination. 2723 204 (No Content) - The source resource was successfully moved to a 2724 URL that was already mapped. 2726 207 (Multi-Status) - Multiple resources were to be affected by the 2727 MOVE, but errors on some of them prevented the operation from taking 2728 place. Specific error messages, together with the most appropriate 2729 of the source and destination URLs, appear in the body of the multi- 2730 status response. E.g. if a source resource was locked and could not 2731 be moved, then the source resource URL appears with the 423 (Locked) 2732 status. 2734 403 (Forbidden) - Among many possible reasons for forbidding a MOVE 2735 operation, this status code is recommended for use when the source 2736 and destination resources are the same. 2738 409 (Conflict) - A resource cannot be created at the destination 2739 until one or more intermediate collections have been created. The 2740 server MUST NOT create those intermediate collections automatically. 2741 Or, the server was unable to preserve the behavior of the live 2742 properties and still move the resource to the destination (see 2743 'preserved-live-properties' postcondition). 2745 412 (Precondition Failed) - A condition header failed. Specific to 2746 MOVE, this could mean that the Overwrite header is "F" and the 2747 destination URL is already mapped to a resource. 2749 423 (Locked) - The source or the destination resource, the source or 2750 destination resource parent, or some resource within the source or 2751 destination collection, was locked. This response SHOULD contain the 2752 'lock-token-submitted' precondition element. 2754 502 (Bad Gateway) - This may occur when the destination is on another 2755 server and the destination server refuses to accept the resource. 2756 This could also occur when the destination is on another sub-section 2757 of the same server namespace. 2759 9.9.5. Example - MOVE of a Non-Collection 2761 This example shows resource 2762 http://www.example.com/~fielding/index.html being moved to the 2763 location http://www.example.com/users/f/fielding/index.html. The 2764 contents of the destination resource would have been overwritten if 2765 the destination URL was already mapped to a resource. In this case, 2766 since there was nothing at the destination resource, the response 2767 code is 201 (Created). 2769 >>Request 2771 MOVE /~fielding/index.html HTTP/1.1 2772 Host: www.example.com 2773 Destination: http://www.example/users/f/fielding/index.html 2775 >>Response 2777 HTTP/1.1 201 Created 2778 Location: http://www.example.com/users/f/fielding/index.html 2780 9.9.6. Example - MOVE of a Collection 2782 >>Request 2784 MOVE /container/ HTTP/1.1 2785 Host: www.example.com 2786 Destination: http://www.example.com/othercontainer/ 2787 Overwrite: F 2788 If: () 2789 () 2791 >>Response 2793 HTTP/1.1 207 Multi-Status 2794 Content-Type: application/xml; charset="utf-8" 2795 Content-Length: xxxx 2797 2798 2799 2800 http://www.example.com/othercontainer/C2/ 2801 HTTP/1.1 423 Locked 2802 2803 2804 2806 In this example the client has submitted a number of lock tokens with 2807 the request. A lock token will need to be submitted for every 2808 resource, both source and destination, anywhere in the scope of the 2809 method, that is locked. In this case the proper lock token was not 2810 submitted for the destination 2811 http://www.example.com/othercontainer/C2/. This means that the 2812 resource /container/C2/ could not be moved. Because there was an 2813 error moving /container/C2/, none of /container/C2's members were 2814 moved. However no errors were listed for those members due to the 2815 error minimization rules. User agent authentication has previously 2816 occurred via a mechanism outside the scope of the HTTP protocol, in 2817 an underlying transport layer. 2819 9.10. LOCK Method 2821 The following sections describe the LOCK method, which is used to 2822 take out a lock of any access type and to refresh an existing lock. 2823 These sections on the LOCK method describe only those semantics that 2824 are specific to the LOCK method and are independent of the access 2825 type of the lock being requested. 2827 Any resource which supports the LOCK method MUST, at minimum, support 2828 the XML request and response formats defined herein. 2830 This method is neither idempotent nor safe (see Section 9.1 of 2831 [RFC2616]). Responses to this method MUST NOT be cached. 2833 9.10.1. Creating a lock on existing resource 2835 A LOCK request to an existing resource will create a lock on the 2836 resource identified by the Request-URI, provided the resource is not 2837 already locked with a conflicting lock. The resource identified in 2838 the Request-URI becomes the root of the lock. Lock method requests 2839 to create a new lock MUST have an XML request body. The server MUST 2840 preserve the information provided by the client in the 'owner' field 2841 in the request body when the lock information is requested. The LOCK 2842 request MAY have a Timeout header. 2844 When a new lock is created, the LOCK response: 2846 o MUST contain a body with the value of the DAV:lockdiscovery 2847 property in a prop XML element. This MUST contain the full 2848 information about the lock just granted, while information about 2849 other (shared) locks is OPTIONAL. 2851 o MUST include the Lock-Token response header with the token 2852 associated with the new lock. 2854 9.10.2. Refreshing Locks 2856 A lock is refreshed by sending a LOCK request to the URL of a 2857 resource within the scope of the lock. This request MUST NOT have a 2858 body and it MUST specify which lock to refresh by using the 'If' 2859 header with a single lock token (only one lock may be refreshed at a 2860 time). The request MAY contain a Timeout header, which a server MAY 2861 accept to change the duration remaining on the lock to the new value. 2862 A server MUST ignore the Depth header on a LOCK refresh. 2864 If the resource has other (shared) locks, those locks are unaffected 2865 by a lock refresh. Additionally, those locks do not prevent the 2866 named lock from being refreshed. 2868 The Lock-Token header is not returned in the response for a 2869 successful refresh LOCK request, but the LOCK response body MUST 2870 contain the new value for the DAV:lockdiscovery property. 2872 9.10.3. Depth and Locking 2874 The Depth header may be used with the LOCK method. Values other than 2875 0 or infinity MUST NOT be used with the Depth header on a LOCK 2876 method. All resources that support the LOCK method MUST support the 2877 Depth header. 2879 A Depth header of value 0 means to just lock the resource specified 2880 by the Request-URI. 2882 If the Depth header is set to infinity then the resource specified in 2883 the Request-URI along with all its members, all the way down the 2884 hierarchy, are to be locked. A successful result MUST return a 2885 single lock token. Similarly, if an UNLOCK is successfully executed 2886 on this token, all associated resources are unlocked. Hence, partial 2887 success is not an option for LOCK or UNLOCK. Either the entire 2888 hierarchy is locked or no resources are locked. 2890 If the lock cannot be granted to all resources, the server MUST 2891 return a Multi-Status response with a 'response' element for at least 2892 one resource which prevented the lock from being granted, along with 2893 a suitable status code for that failure (e.g. 403 (Forbidden) or 423 2894 (Locked)). Additionally, if the resource causing the failure was not 2895 the resource requested, then the server SHOULD include a 'response' 2896 element for the Request-URI as well, with a 'status' element 2897 containing 424 Failed Dependency. 2899 If no Depth header is submitted on a LOCK request then the request 2900 MUST act as if a "Depth:infinity" had been submitted. 2902 9.10.4. Locking Unmapped URLs 2904 A successful LOCK method MUST result in the creation of an empty 2905 resource which is locked (and which is not a collection), when a 2906 resource did not previously exist at that URL. Later on, the lock 2907 may go away but the empty resource remains. Empty resources MUST 2908 then appear in PROPFIND responses including that URL in the response 2909 scope. A server MUST respond successfully to a GET request to an 2910 empty resource, either by using a 204 No Content response, or by 2911 using 200 OK with a Content-Length header indicating zero length 2913 9.10.5. Lock Compatibility Table 2915 The table below describes the behavior that occurs when a lock 2916 request is made on a resource. 2918 +--------------------------+----------------+-------------------+ 2919 | Current State | Shared Lock OK | Exclusive Lock OK | 2920 +--------------------------+----------------+-------------------+ 2921 | None | True | True | 2922 | | | | 2923 | Shared Lock | True | False | 2924 | | | | 2925 | Exclusive Lock | False | False* | 2926 +--------------------------+----------------+-------------------+ 2928 Legend: True = lock may be granted. False = lock MUST NOT be 2929 granted. *=It is illegal for a principal to request the same lock 2930 twice. 2932 The current lock state of a resource is given in the leftmost column, 2933 and lock requests are listed in the first row. The intersection of a 2934 row and column gives the result of a lock request. For example, if a 2935 shared lock is held on a resource, and an exclusive lock is 2936 requested, the table entry is "false", indicating the lock must not 2937 be granted. 2939 9.10.6. LOCK Responses 2941 In addition to the general status codes possible, the following 2942 status codes have specific applicability to LOCK: 2944 200 (OK) - The LOCK request succeeded and the value of the DAV: 2945 lockdiscovery property is included in the response body. 2947 201 (Created) - The LOCK request was to an unmapped URL, the request 2948 succeeded and resulted in the creation of a new resource, and the 2949 value of the DAV:lockdiscovery property is included in the response 2950 body. 2952 409 (Conflict) - A resource cannot be created at the destination 2953 until one or more intermediate collections have been created. The 2954 server MUST NOT create those intermediate collections automatically. 2956 423 (Locked), potentially with 'no-conflicting-lock' precondition 2957 code - There is already a lock on the resource which is not 2958 compatible with the requested lock (see lock compatibility table 2959 above). 2961 412 (Precondition Failed), with 'lock-token-matches-request-uri' 2962 precondition code - The LOCK request was made with a If header, 2963 indicating that the client wishes to refresh the given lock. 2964 However, the Request-URI did not fall within the scope of the lock 2965 identified by the token. The lock may have a scope that does not 2966 include the Request-URI, or the lock could have disappeared, or the 2967 token may be invalid. 2969 9.10.7. Example - Simple Lock Request 2971 >>Request 2973 LOCK /workspace/webdav/proposal.doc HTTP/1.1 2974 Host: example.com 2975 Timeout: Infinite, Second-4100000000 2976 Content-Type: application/xml; charset="utf-8" 2977 Content-Length: xxxx 2978 Authorization: Digest username="ejw", 2979 realm="ejw@example.com", nonce="...", 2980 uri="/workspace/webdav/proposal.doc", 2981 response="...", opaque="..." 2983 2984 2985 2986 2987 2988 http://example.org/~ejw/contact.html 2989 2990 2992 >>Response 2994 HTTP/1.1 200 OK 2995 Lock-Token: 2996 Content-Type: application/xml; charset="utf-8" 2997 Content-Length: xxxx 2999 3000 3001 3002 3003 3004 3005 infinity 3006 3007 http://example.org/~ejw/contact.html 3008 3009 Second-604800 3010 3011 urn:uuid:e71d4fae-5dec-22d6-fea5-00a0c91e6be4 3013 3014 3015 http://example.com/workspace/webdav/proposal.doc 3017 3018 3019 3020 3022 This example shows the successful creation of an exclusive write lock 3023 on resource http://example.com/workspace/webdav/proposal.doc. The 3024 resource http://example.org/~ejw/contact.html contains contact 3025 information for the creator of the lock. The server has an activity- 3026 based timeout policy in place on this resource, which causes the lock 3027 to automatically be removed after 1 week (604800 seconds). Note that 3028 the nonce, response, and opaque fields have not been calculated in 3029 the Authorization request header. 3031 9.10.8. Example - Refreshing a Write Lock 3033 >>Request 3035 LOCK /workspace/webdav/proposal.doc HTTP/1.1 3036 Host: example.com 3037 Timeout: Infinite, Second-4100000000 3038 If: () 3039 Authorization: Digest username="ejw", 3040 realm="ejw@example.com", nonce="...", 3041 uri="/workspace/webdav/proposal.doc", 3042 response="...", opaque="..." 3044 >>Response 3046 HTTP/1.1 200 OK 3047 Content-Type: application/xml; charset="utf-8" 3048 Content-Length: xxxx 3050 3051 3052 3053 3054 3055 3056 infinity 3057 3058 http://example.org/~ejw/contact.html 3059 3060 Second-604800 3061 3062 urn:uuid:e71d4fae-5dec-22d6-fea5-00a0c91e6be4 3064 3065 3066 http://example.com/workspace/webdav/proposal.doc 3068 3069 3070 3071 3073 This request would refresh the lock, attempting to reset the timeout 3074 to the new value specified in the timeout header. Notice that the 3075 client asked for an infinite time out but the server choose to ignore 3076 the request. In this example, the nonce, response, and opaque fields 3077 have not been calculated in the Authorization request header. 3079 9.10.9. Example - Multi-Resource Lock Request 3081 >>Request 3083 LOCK /webdav/ HTTP/1.1 3084 Host: example.com 3085 Timeout: Infinite, Second-4100000000 3086 Depth: infinity 3087 Content-Type: application/xml; charset="utf-8" 3088 Content-Length: xxxx 3089 Authorization: Digest username="ejw", 3090 realm="ejw@example.com", nonce="...", 3091 uri="/workspace/webdav/proposal.doc", 3092 response="...", opaque="..." 3094 3095 3096 3097 3098 3099 http://example.org/~ejw/contact.html 3100 3101 3103 >>Response 3105 HTTP/1.1 207 Multi-Status 3106 Content-Type: application/xml; charset="utf-8" 3107 Content-Length: xxxx 3109 3110 3111 3112 http://example.com/webdav/secret 3113 HTTP/1.1 403 Forbidden 3114 3115 3116 http://example.com/webdav/ 3117 HTTP/1.1 424 Failed Dependency 3118 3119 3121 This example shows a request for an exclusive write lock on a 3122 collection and all its children. In this request, the client has 3123 specified that it desires an infinite length lock, if available, 3124 otherwise a timeout of 4.1 billion seconds, if available. The 3125 request entity body contains the contact information for the 3126 principal taking out the lock, in this case a web page URL. 3128 The error is a 403 (Forbidden) response on the resource 3129 http://example.com/webdav/secret. Because this resource could not be 3130 locked, none of the resources were locked. Note also that the a 3131 'response' element for the Request-URI itself has been included as 3132 required. 3134 In this example, the nonce, response, and opaque fields have not been 3135 calculated in the Authorization request header. 3137 9.11. UNLOCK Method 3139 The UNLOCK method removes the lock identified by the lock token in 3140 the Lock-Token request header. The Request-URI MUST identify a 3141 resource within the scope of the lock. 3143 Note that use of Lock-Token header to provide the lock token is not 3144 consistent with other state-changing methods which all require an If 3145 header with the lock token. Thus, the If header is not needed to 3146 provide the lock token. Naturally when the If header is present it 3147 has its normal meaning as a conditional header. 3149 For a successful response to this method, the server MUST delete the 3150 lock entirely. 3152 If all resources which have been locked under the submitted lock 3153 token can not be unlocked then the UNLOCK request MUST fail. 3155 A successful response to an UNLOCK method does not mean that the 3156 resource is necessarily unlocked. It means that the specific lock 3157 corresponding to the specified token no longer exists. 3159 Any DAV compliant resource which supports the LOCK method MUST 3160 support the UNLOCK method. 3162 This method is idempotent, but not safe (see Section 9.1 of 3163 [RFC2616]). Responses to this method MUST NOT be cached. 3165 9.11.1. Status Codes 3167 In addition to the general status codes possible, the following 3168 status codes have specific applicability to UNLOCK: 3170 204 (No Content) - Normal success response (rather than 200 OK, since 3171 200 OK would imply a response body, and an UNLOCK success response 3172 does not normally contain a body) 3173 400 (Bad Request) - No lock token was provided. 3175 403 (Forbidden) - The currently authenticated principal does not have 3176 permission to remove the lock. 3178 409 (Conflict), with 'lock-token-matches-request-uri' precondition - 3179 The resource was not locked, or the request was made to a Request-URI 3180 that was not within the scope of the lock. 3182 9.11.2. Example - UNLOCK 3184 >>Request 3186 UNLOCK /workspace/webdav/info.doc HTTP/1.1 3187 Host: example.com 3188 Lock-Token: 3189 Authorization: Digest username="ejw" 3190 realm="ejw@example.com", nonce="...", 3191 uri="/workspace/webdav/proposal.doc", 3192 response="...", opaque="..." 3194 >>Response 3196 HTTP/1.1 204 No Content 3198 In this example, the lock identified by the lock token 3199 "urn:uuid:a515cfa4-5da4-22e1-f5b5-00a0451e6bf7" is successfully 3200 removed from the resource 3201 http://example.com/workspace/webdav/info.doc. If this lock included 3202 more than just one resource, the lock is removed from all resources 3203 included in the lock. 3205 In this example, the nonce, response, and opaque fields have not been 3206 calculated in the Authorization request header. 3208 10. HTTP Headers for Distributed Authoring 3210 All DAV headers follow the same basic formatting rules as HTTP 3211 headers. This includes rules like line continuation and how to 3212 combine (or separate) multiple instances of the same header using 3213 commas. 3215 WebDAV adds two new conditional headers to the set defined in HTTP: 3216 the If and Overwrite headers. 3218 10.1. DAV Header 3220 DAV = "DAV" ":" #( compliance-class ) 3221 compliance-class = ( "1" | "2" | "3" | extend ) 3222 extend = Coded-URL | token 3223 Coded-URL = "<" absolute-URI ">" 3224 ; No LWS allowed in Coded-URL 3225 ; absolute-URI is defined in RFC3986 3227 This general-header appearing in the response indicates that the 3228 resource supports the DAV schema and protocol as specified. All DAV 3229 compliant resources MUST return the DAV header with compliance-class 3230 "1" on all OPTIONS responses. In cases where WebDAV is only 3231 supported in part of the server namespace, an OPTIONS request to non- 3232 WebDAV resources (including "/") SHOULD NOT advertise WebDAV support. 3234 The value is a comma-separated list of all compliance class 3235 identifiers that the resource supports. Class identifiers may be 3236 Coded-URLs or tokens (as defined by [RFC2616]). Identifiers can 3237 appear in any order. Identifiers that are standardized through the 3238 IETF RFC process are tokens, but other identifiers SHOULD be Coded- 3239 URLs to encourage uniqueness. 3241 A resource must show class 1 compliance if it shows class 2 or 3 3242 compliance. In general, support for one compliance class does not 3243 entail support for any other, and in particular, support for 3244 compliance class 3 does not require support for compliance class 2. 3245 Please refer to Section 18 for more details on compliance classes 3246 defined in this specification. 3248 Note that many WebDAV servers do not advertise WebDAV support in 3249 response to "OPTIONS *". 3251 As a request header, this header allows the client to advertise 3252 compliance with named features when the server needs that 3253 information. Clients SHOULD NOT send this header unless a standards 3254 track specification requires it. Any extension that makes use of 3255 this as a request header will need to carefully consider caching 3256 implications. 3258 10.2. Depth Header 3260 Depth = "Depth" ":" ("0" | "1" | "infinity") 3262 The Depth request header is used with methods executed on resources 3263 which could potentially have internal members to indicate whether the 3264 method is to be applied only to the resource ("Depth: 0"), to the 3265 resource and its internal members only, ("Depth: 1"), or the resource 3266 and all its members ("Depth: infinity"). 3268 The Depth header is only supported if a method's definition 3269 explicitly provides for such support. 3271 The following rules are the default behavior for any method that 3272 supports the Depth header. A method may override these defaults by 3273 defining different behavior in its definition. 3275 Methods which support the Depth header may choose not to support all 3276 of the header's values and may define, on a case by case basis, the 3277 behavior of the method if a Depth header is not present. For 3278 example, the MOVE method only supports "Depth: infinity" and if a 3279 Depth header is not present will act as if a "Depth: infinity" header 3280 had been applied. 3282 Clients MUST NOT rely upon methods executing on members of their 3283 hierarchies in any particular order or on the execution being atomic 3284 unless the particular method explicitly provides such guarantees. 3286 Upon execution, a method with a Depth header will perform as much of 3287 its assigned task as possible and then return a response specifying 3288 what it was able to accomplish and what it failed to do. 3290 So, for example, an attempt to COPY a hierarchy may result in some of 3291 the members being copied and some not. 3293 By default, the Depth header does not interact with other headers. 3294 That is, each header on a request with a Depth header MUST be applied 3295 only to the Request-URI if it applies to any resource, unless 3296 specific Depth behavior is defined for that header. 3298 If a resource, source or destination, within the scope of the method 3299 with a Depth header is locked in such a way as to prevent the 3300 successful execution of the method, then the lock token for that 3301 resource MUST be submitted with the request in the If request header. 3303 The Depth header only specifies the behavior of the method with 3304 regards to internal members. If a resource does not have internal 3305 members then the Depth header MUST be ignored. 3307 10.3. Destination Header 3309 The Destination request header specifies the URI which identifies a 3310 destination resource for methods such as COPY and MOVE, which take 3311 two URIs as parameters. 3313 Destination = "Destination" ":" Simple-ref 3315 If the Destination value is an absolute-URI (Section 4.3 of 3316 [RFC3986]), it may name a different server (or different port or 3317 scheme). If the source server cannot attempt a copy to the remote 3318 server, it MUST fail the request. Note that copying and moving 3319 resources to remote servers is not fully defined in this 3320 specification (e.g. specific error conditions). 3322 If the Destination value is too long or otherwise unacceptable, the 3323 server SHOULD return 400 (Bad Request), ideally with helpful 3324 information in an error body. 3326 10.4. If Header 3328 The If request header is intended to have similar functionality to 3329 the If-Match header defined in Section 14.24 of [RFC2616]. However 3330 the If header handles any state token as well as ETags. A typical 3331 example of a state token is a lock token, and lock tokens are the 3332 only state tokens defined in this specification. 3334 10.4.1. Purpose 3336 The If header has two distinct purposes: 3338 o The first purpose is to make a request conditional by supplying a 3339 series of state lists with conditions that match tokens and ETags 3340 to specific resource. If this header is evaluated and all state 3341 lists fail, then the request MUST fail with a 412 (Precondition 3342 Failed) status. On the other hand, the request can succeed only 3343 if one of the described state lists succeeds. The success 3344 criteria for state lists and matching functions are defined in 3345 Section 10.4.3 and Section 10.4.4. 3347 o Additionally, the mere fact that a state token appears in an If 3348 header means that it has been "submitted" with the request. In 3349 general, this is used to indicate that the client has knowledge of 3350 that state token. The semantics for submitting a state token 3351 depend on its type (for lock tokens, please refer to Section 6). 3353 Note that these two purposes need to be treated distinctly: a state 3354 token counts as being submitted independently of whether the server 3355 actually has evaluated the state list it appears in, and also 3356 independently of whether the condition it expressed was found to be 3357 true or not. 3359 10.4.2. Syntax 3361 If = "If" ":" ( 1*No-tag-list | 1*Tagged-list ) 3363 No-tag-list = List 3364 Tagged-list = Resource-Tag 1*List 3366 List = "(" 1*Condition ")" 3367 Condition = ["Not"] (State-token | "[" entity-tag "]") 3368 ; entity-tag: see Section 3.11 of [RFC2616] 3369 ; No LWS allowed between "[", entity-tag and "]" 3371 State-token = Coded-URL 3373 Resource-Tag = "<" Simple-ref ">" 3374 ; Simple-ref: see Section 8.3 3375 ; No LWS allowed in Resource-Tag 3377 The syntax distinguishes between untagged lists ("No-tag-list") and 3378 tagged lists ("Tagged-list"). Untagged lists apply to the resource 3379 identified by the Request-URI, while tagged lists apply to the 3380 resource identified by the preceding Resource-Tag. 3382 A Resource-Tag applies to all subsequent Lists, up to the next 3383 Resource-Tag. 3385 Note that the two list types cannot be mixed within an If header. 3386 This is not a functional restriction because the No-tag-list syntax 3387 is just a shorthand notation for a Tagged-list production with a 3388 Resource-Tag referring to the Request-URI. 3390 Each List consists of one or more Conditions. Each Condition is 3391 defined in terms of an entity-tag or state-token, potentially negated 3392 by the prefix "Not". 3394 Note that the If header syntax does not allow multiple instances of 3395 If headers in a single request. However, the HTTP header syntax 3396 allows extending single header values across multiple lines, by 3397 inserting a line break followed by whitespace (see [RFC2616], Section 3398 4.2). 3400 10.4.3. List Evaluation 3402 A Condition that consists of a single entity-tag or state-token 3403 evaluates to true if the resource matches the described state (where 3404 the individual matching functions are defined below in 3405 Section 10.4.4). Prefixing it with "Not" reverses the result of the 3406 evaluation (thus, the "Not" applies only to the subsequent entity-tag 3407 or state-token). 3409 Each List production describes a series of conditions. The whole 3410 list evaluates to true if and only if each condition evaluates to 3411 true (that is, the list represents a logical conjunction of 3412 Conditions). 3414 Each No-tag-list and Tagged-list production may contain one or more 3415 Lists. They evaluate to true if and only if any of the contained 3416 lists evaluates to true (that is, if there's more than one List, that 3417 List sequence represents a logical disjunction of the Lists). 3419 Finally, the whole If header evaluates to true if and only if at 3420 least one of the No-tag-list or Tagged-list productions evaluates to 3421 true. If the header evaluates to false, the server MUST reject the 3422 request with a 412 (Precondition Failed) status. Otherwise, 3423 execution of the request can proceed as if the header wasn't present. 3425 10.4.4. Matching State Tokens and ETags 3427 When performing If header processing, the definition of a matching 3428 state token or entity tag is as follows: 3430 Identifying a resource: The resource is identified by the URI along 3431 with the token, in tagged list production, or by the Request-URI in 3432 untagged list production. 3434 Matching entity tag: Where the entity tag matches an entity tag 3435 associated with the identified resource. Servers MUST use either the 3436 weak or the strong comparison function defined in Section 13.3.3 of 3437 [RFC2616]. 3439 Matching state token: Where there is an exact match between the state 3440 token in the If header and any state token on the identified 3441 resource. A lock state token is considered to match if the resource 3442 is anywhere in the scope of the lock. 3444 Handling unmapped URLs: for both ETags and state tokens, treat as if 3445 the URL identified a resource that exists but does not have the 3446 specified state. 3448 10.4.5. If Header and Non-DAV Aware Proxies 3450 Non-DAV aware proxies will not honor the If header, since they will 3451 not understand the If header, and HTTP requires non-understood 3452 headers to be ignored. When communicating with HTTP/1.1 proxies, the 3453 client MUST use the "Cache-Control: no-cache" request header so as to 3454 prevent the proxy from improperly trying to service the request from 3455 its cache. When dealing with HTTP/1.0 proxies the "Pragma: no-cache" 3456 request header MUST be used for the same reason. 3458 As in general clients may not be able to reliably detect non-DAV 3459 aware intermediates, they are advised to always prevent caching using 3460 the request directives mentioned above. 3462 10.4.6. Example - No-tag Production 3464 If: ( 3465 ["I am an ETag"]) 3466 (["I am another ETag"]) 3468 The previous header would require that the resource identified in the 3469 Request-URI be locked with the specified lock token and be in the 3470 state identified by the "I am an ETag" ETag or in the state 3471 identified by the second ETag "I am another ETag". 3473 To put the matter more plainly one can think of the previous If 3474 header as expressing the condition below: 3476 ( 3477 is-locked-with(urn:uuid:181d4fae-7d8c-11d0-a765-00a0c91e6bf2) AND 3478 matches-etag("I am an ETag") 3479 ) 3480 OR 3481 ( 3482 matches-etag("I am another ETag") 3483 ) 3485 10.4.7. Example - using "Not" with No-tag Production 3487 If: (Not 3488 ) 3490 This If header requires that the resource must not be locked with a 3491 lock having the lock token 3492 urn:uuid:181d4fae-7d8c-11d0-a765-00a0c91e6bf2 and must be locked by a 3493 lock with the lock token 3494 urn:uuid:58f202ac-22cf-11d1-b12d-002035b29092. 3496 10.4.8. Example - causing a Condition to always evaluate to True 3498 There may be cases where a client wishes to submit state tokens, but 3499 doesn't want the request to fail just because the state token isn't 3500 current anymore. One simple way to do this is to include a Condition 3501 that is known to always evaluate to true, such as in: 3503 If: () 3504 (Not ) 3506 "DAV:no-lock" is known to never represent a current lock token, as 3507 lock tokens are assigned by the server, following the uniqueness 3508 requirements described in Section 6.5, therefore in particular 3509 exclude URIs in the "DAV:" scheme. Thus, by applying "Not" to a 3510 known not to be current state token, the Condition always evaluates 3511 to true. Consequently, the whole If header will always evaluate to 3512 true, and the lock token 3513 urn:uuid:181d4fae-7d8c-11d0-a765-00a0c91e6bf2 will be submitted in 3514 any case. 3516 10.4.9. Example - Tagged List If header in COPY 3518 >>Request 3520 COPY /resource1 HTTP/1.1 3521 Host: www.example.com 3522 Destination: /resource2 3523 If: 3524 ( 3525 [W/"A weak ETag"]) (["strong ETag"]) 3527 In this example http://www.example.com/resource1 is being copied to 3528 http://www.example.com/resource2. When the method is first applied 3529 to http://www.example.com/resource1, resource1 must be in the state 3530 specified by "( [W/"A 3531 weak ETag"]) (["strong ETag"])", that is, it either must be locked 3532 with a lock token of "urn:uuid:181d4fae-7d8c-11d0-a765-00a0c91e6bf2" 3533 and have a weak entity tag W/"A weak ETag" or it must have a strong 3534 entity tag "strong ETag". 3536 10.4.10. Example - Matching lock tokens with collection locks 3538 DELETE /specs/rfc2518.txt HTTP/1.1 3539 Host: www.example.com 3540 If: 3541 () 3543 For this example, the lock token must be compared to the identified 3544 resource, which is the 'specs' collection identified by the URL in 3545 the tagged list production. If the 'specs' collection is not locked 3546 by a lock with the specified lock token, the request MUST fail. 3547 Otherwise, this request could succeed, because the If header 3548 evaluates to true, and because the lock token for the lock affecting 3549 the affected resource has been submitted. 3551 10.4.11. Example - Matching ETags on unmapped URLs 3553 Consider a collection "/specs" that does not contain the member 3554 "/specs/rfc2518.doc". In this case, the If header 3556 If: (["4217"]) 3558 will evaluate to false (the URI isn't mapped, thus the resource 3559 identified by the URI doesn't have an entity matching the ETag 3560 "4217"). 3562 On the other hand, an If header of 3564 If: (Not ["4217"]) 3566 will consequently evaluate to true. 3568 Note that as defined above in Section 10.4.4, the same considerations 3569 apply to matching state tokens. 3571 10.5. Lock-Token Header 3573 Lock-Token = "Lock-Token" ":" Coded-URL 3575 The Lock-Token request header is used with the UNLOCK method to 3576 identify the lock to be removed. The lock token in the Lock-Token 3577 request header MUST identify a lock that contains the resource 3578 identified by Request-URI as a member. 3580 The Lock-Token response header is used with the LOCK method to 3581 indicate the lock token created as a result of a successful LOCK 3582 request to create a new lock. 3584 10.6. Overwrite Header 3586 Overwrite = "Overwrite" ":" ("T" | "F") 3588 The Overwrite request header specifies whether the server should 3589 overwrite a resource mapped to the destination URL during a COPY or 3590 MOVE. A value of "F" states that the server must not perform the 3591 COPY or MOVE operation if the destination URL does map to a resource. 3593 If the overwrite header is not included in a COPY or MOVE request 3594 then the resource MUST treat the request as if it has an overwrite 3595 header of value "T". While the Overwrite header appears to duplicate 3596 the functionality of the If-Match: * header of HTTP/1.1, If-Match 3597 applies only to the Request-URI, and not to the Destination of a COPY 3598 or MOVE. 3600 If a COPY or MOVE is not performed due to the value of the Overwrite 3601 header, the method MUST fail with a 412 (Precondition Failed) status 3602 code. The server MUST do authorization checks before checking this 3603 or any conditional header. 3605 All DAV compliant resources MUST support the Overwrite header. 3607 10.7. Timeout Request Header 3609 TimeOut = "Timeout" ":" 1#TimeType 3610 TimeType = ("Second-" DAVTimeOutVal | "Infinite") 3611 ; No LWS allowed within TimeType 3612 DAVTimeOutVal = 1*DIGIT 3614 Clients MAY include Timeout request headers in their LOCK requests. 3615 However, the server is not required to honor or even consider these 3616 requests. Clients MUST NOT submit a Timeout request header with any 3617 method other than a LOCK method. 3619 The "Second" TimeType specifies the number of seconds that will 3620 elapse between granting of the lock at the server, and the automatic 3621 removal of the lock. The timeout value for TimeType "Second" MUST 3622 NOT be greater than 2^32-1. 3624 See Section 6.6 for a description of lock timeout behavior. 3626 11. Status Code Extensions to HTTP/1.1 3628 The following status codes are added to those defined in HTTP/1.1 3629 [RFC2616]. 3631 11.1. 207 Multi-Status 3633 The 207 (Multi-Status) status code provides status for multiple 3634 independent operations (see Section 13 for more information). 3636 11.2. 422 Unprocessable Entity 3638 The 422 (Unprocessable Entity) status code means the server 3639 understands the content type of the request entity (hence a 3640 415(Unsupported Media Type) status code is inappropriate), and the 3641 syntax of the request entity is correct (thus a 400 (Bad Request) 3642 status code is inappropriate) but was unable to process the contained 3643 instructions. For example, this error condition may occur if an XML 3644 request body contains well-formed (i.e., syntactically correct), but 3645 semantically erroneous XML instructions. 3647 11.3. 423 Locked 3649 The 423 (Locked) status code means the source or destination resource 3650 of a method is locked. This response SHOULD contain an appropriate 3651 precondition or postcondition code, such as 'lock-token-submitted' or 3652 'no-conflicting-lock". 3654 11.4. 424 Failed Dependency 3656 The 424 (Failed Dependency) status code means that the method could 3657 not be performed on the resource because the requested action 3658 depended on another action and that action failed. For example, if a 3659 command in a PROPPATCH method fails then, at minimum, the rest of the 3660 commands will also fail with 424 (Failed Dependency). 3662 11.5. 507 Insufficient Storage 3664 The 507 (Insufficient Storage) status code means the method could not 3665 be performed on the resource because the server is unable to store 3666 the representation needed to successfully complete the request. This 3667 condition is considered to be temporary. If the request which 3668 received this status code was the result of a user action, the 3669 request MUST NOT be repeated until it is requested by a separate user 3670 action. 3672 12. Use of HTTP Status Codes 3674 These HTTP codes are not redefined, but their use is somewhat 3675 extended by WebDAV methods and requirements. In general, many HTTP 3676 status codes can be used in response to any request, not just in 3677 cases described in this document. Note also that WebDAV servers are 3678 known to use 300-level redirect responses (and early interoperability 3679 tests found clients unprepared to see those responses). A 300-level 3680 response MUST NOT be used when the server has created a new resource 3681 in response to the request. 3683 12.1. 412 Precondition Failed 3685 Any request can contain a conditional header defined in HTTP (If- 3686 Match, If-Modified-Since, etc.) or the "If" or "Overwrite" 3687 conditional headers defined in this specification. If the server 3688 evaluates a conditional header, and if that condition fails to hold, 3689 then this error code MUST be returned. On the other hand, if the 3690 client did not include a conditional header in the request, then the 3691 server MUST NOT use this status code. 3693 12.2. 414 Request-URI Too Long 3695 This status code is used in HTTP 1.1 only for Request-URIs, not URIs 3696 in other locations. 3698 13. Multi-Status Response 3700 A Multi-Status response conveys information about multiple resources 3701 in situations where multiple status codes might be appropriate. The 3702 default Multi-Status response body is a text/xml or application/xml 3703 HTTP entity with a 'multistatus' root element. Further elements 3704 contain 200, 300, 400, and 500 series status codes generated during 3705 the method invocation. 100 series status codes SHOULD NOT be recorded 3706 in a 'response' XML element. 3708 Although '207' is used as the overall response status code, the 3709 recipient needs to consult the contents of the multistatus response 3710 body for further information about the success or failure of the 3711 method execution. The response MAY be used in success, partial 3712 success and also in failure situations. 3714 The 'multistatus' root element holds zero or more 'response' elements 3715 in any order, each with information about an individual resource. 3716 Each 'response' element MUST have an 'href' element to identify the 3717 resource. 3719 A Multi-Status response uses one out of two distinct formats for 3720 representing the status: 3722 1. A 'status' element as child of the 'response' element indicates 3723 the status of the message excecution for the identified resource 3724 as a whole (for instance, see Section 9.6.2). Some method 3725 definitions provide information about specific status codes 3726 clients should be prepared to see in a response. However, 3727 clients MUST be able to handle other status codes, using the 3728 generic rules defined in Section 10 of [RFC2616]. 3730 2. For PROPFIND and PROPPATCH, the format has been extended using 3731 the 'propstat' element instead of 'status', providing information 3732 about individual properties of a resource. This format is 3733 specific to PROPFIND and PROPPATCH, and is described in detail in 3734 Section 9.1 and Section 9.2. 3736 13.1. Response headers 3738 HTTP defines the Location header to indicate a preferred URL for the 3739 resource that was addressed in the Request-URI (e.g. in response to 3740 successful PUT requests or in redirect responses). However, use of 3741 this header creates ambiguity when there are URLs in the body of the 3742 response, as with Multi-Status. Thus, use of the Location header 3743 with the Multi-Status response is intentionally undefined. 3745 13.2. Handling redirected child resources 3747 Redirect responses (300-303, 305 and 307) defined in HTTP 1.1 3748 normally take a Location header to indicate the new URI for the 3749 single resource redirected from the Request-URI. Multi-Status 3750 responses contain many resource addresses, but the original 3751 definition in [RFC2518] did not have any place for the server to 3752 provide the new URI for redirected resources. This specification 3753 does define a 'location' element for this information (see 3754 Section 14.9). Servers MUST use this new element with redirect 3755 responses in Multi-Status. 3757 Clients encountering redirected resources in Multi-Status MUST NOT 3758 rely on the 'location' element being present with a new URI. If the 3759 element is not present, the client MAY reissue the request to the 3760 individual redirected resource, because the response to that request 3761 can be redirected with a Location header containing the new URI. 3763 13.3. Internal Status Codes 3765 Section 9.2.1, Section 9.1.2, Section 9.6.1, Section 9.8.3 and 3766 Section 9.9.2 define various status codes used in Multi-Status 3767 responses. This specification does not define the meaning of other 3768 status codes that could appear in these responses. 3770 14. XML Element Definitions 3772 In this section, the final line of each section gives the element 3773 type declaration using the format defined in [REC-XML]. The "Value" 3774 field, where present, specifies further restrictions on the allowable 3775 contents of the XML element using BNF (i.e., to further restrict the 3776 values of a PCDATA element). Note that all of the elements defined 3777 here may be extended according to the rules defined in Section 17. 3778 All elements defined here are in the "DAV:" namespace. 3780 14.1. activelock XML Element 3782 Name: activelock 3784 Purpose: Describes a lock on a resource. 3786 3789 14.2. allprop XML Element 3791 Name: allprop 3793 Purpose: Specifies that all names and values of dead properties and 3794 the live properties defined by this document existing on the 3795 resource are to be returned. 3797 3799 14.3. collection XML Element 3801 Name: collection 3803 Purpose: Identifies the associated resource as a collection. The 3804 DAV:resourcetype property of a collection resource MUST contain 3805 this element. It is normally empty but extensions may add sub- 3806 elements. 3808 3810 14.4. depth XML Element 3812 Name: depth 3813 Purpose: Used for representing depth values in XML content (e.g. in 3814 lock information). 3816 Value: "0" | "1" | "infinity" 3818 3820 14.5. error XML Element 3822 Name: error 3824 Purpose: Error responses, particularly 403 Forbidden and 409 3825 Conflict, sometimes need more information to indicate what went 3826 wrong. In these cases, servers MAY return an XML response body 3827 with a document element of 'error', containing child elements 3828 identifying particular condition codes. 3830 Description: Contains at least one XML element, and MUST NOT 3831 contain text or mixed content. Any element that is a child of the 3832 'error' element is considered to be a precondition or 3833 postcondition code. Unrecognized elements MUST be ignored. 3835 3837 14.6. exclusive XML Element 3839 Name: exclusive 3841 Purpose: Specifies an exclusive lock. 3843 3845 14.7. href XML Element 3847 Name: href 3849 Purpose: MUST contain a URI or a relative reference. 3851 Description: There may be limits on the value of 'href' depending 3852 on the context of its use. Refer to the specification text where 3853 'href' is used to see what limitations apply in each case. 3855 Value: Simple-ref 3857 3859 14.8. include XML Element 3861 Name: include 3863 Purpose: Any child element represents the name of a property to be 3864 included in the PROPFIND response. All elements inside an 3865 'include' XML element MUST define properties related to the 3866 resource, although possible property names are in no way limited 3867 to those property names defined in this document or other 3868 standards. This element MUST NOT contain text or mixed content. 3870 3872 14.9. location XML Element 3874 Name: location 3876 Purpose: HTTP defines the "Location" header (see [RFC2616], Section 3877 14.30) for use with some status codes (such as 201 and the 300 3878 series codes). When these codes are used inside a 'multistatus' 3879 element, the 'location' element can be used to provide the 3880 accompanying Location header value. 3882 Description: Contains a single href element with the same value 3883 that would be used in a Location header. 3885 3887 14.10. lockentry XML Element 3889 Name: lockentry 3891 Purpose: Defines the types of locks that can be used with the 3892 resource. 3894 3896 14.11. lockinfo XML Element 3898 Name: lockinfo 3900 Purpose: The 'lockinfo' XML element is used with a LOCK method to 3901 specify the type of lock the client wishes to have created. 3903 3905 14.12. lockroot XML Element 3907 Name: lockroot 3909 Purpose: Contains the root URL of the lock, which is the URL 3910 through which the resource was addressed in the LOCK request. 3912 Description: The href element contains the root of the lock. The 3913 server SHOULD include this in all DAV:lockdiscovery property 3914 values and the response to LOCK requests. 3916 3918 14.13. lockscope XML Element 3920 Name: lockscope 3922 Purpose: Specifies whether a lock is an exclusive lock, or a shared 3923 lock. 3925 3927 14.14. locktoken XML Element 3929 Name: locktoken 3931 Purpose: The lock token associated with a lock. 3933 Description: The href contains a single lock token URI which refers 3934 to the lock. 3936 3938 14.15. locktype XML Element 3940 Name: locktype 3942 Purpose: Specifies the access type of a lock. At present, this 3943 specification only defines one lock type, the write lock. 3945 3947 14.16. multistatus XML Element 3949 Name: multistatus 3951 Purpose: Contains multiple response messages. 3953 Description: The 'responsedescription' element at the top level is 3954 used to provide a general message describing the overarching 3955 nature of the response. If this value is available an application 3956 may use it instead of presenting the individual response 3957 descriptions contained within the responses. 3959 3961 14.17. owner XML Element 3963 Name: owner 3965 Purpose: Provides information about the creator of a lock. 3967 Description: Allows a client to provide information sufficient for 3968 either directly contacting a principal (such as a telephone number 3969 or Email URI), or for discovering the principal (such as the URL 3970 of a homepage) who created a lock. The value provided MUST be 3971 treated as a dead property in terms of XML Information Item 3972 preservation. The server MUST NOT alter the value unless the 3973 owner value provided by the client is empty. For a certain amount 3974 of interoperability between different client implementations, if 3975 clients have URI-formatted contact information for the lock 3976 creator suitable for user display, then clients SHOULD put those 3977 URIs in 'href' child elements of the 'owner' element. 3979 Extensibility: MAY be extended with child elements, mixed content, 3980 text content or attributes. 3982 3984 14.18. prop XML element 3986 Name: prop 3988 Purpose: Contains properties related to a resource. 3990 Description: A generic container for properties defined on 3991 resources. All elements inside a 'prop' XML element MUST define 3992 properties related to the resource, although possible property 3993 names are in no way limited to those property names defined in 3994 this document or other standards. This element MUST NOT contain 3995 text or mixed content. 3997 3999 14.19. propertyupdate XML element 4001 Name: propertyupdate 4003 Purpose: Contains a request to alter the properties on a resource. 4005 Description: This XML element is a container for the information 4006 required to modify the properties on the resource. 4008 4010 14.20. propfind XML Element 4012 Name: propfind 4014 Purpose: Specifies the properties to be returned from a PROPFIND 4015 method. Four special elements are specified for use with 4016 'propfind': 'prop', 'allprop', 'include' and 'propname'. If 4017 'prop' is used inside 'propfind' it MUST NOT contain property 4018 values. 4020 4022 14.21. propname XML Element 4024 Name: propname 4026 Purpose: Specifies that only a list of property names on the 4027 resource is to be returned. 4029 4031 14.22. propstat XML Element 4033 Name: propstat 4034 Purpose: Groups together a prop and status element that is 4035 associated with a particular 'href' element. 4037 Description: The propstat XML element MUST contain one prop XML 4038 element and one status XML element. The contents of the prop XML 4039 element MUST only list the names of properties to which the result 4040 in the status element applies. The optional precondition/ 4041 postcondition element and 'responsedescription' text also apply to 4042 the properties named in 'prop'. 4044 4046 14.23. remove XML element 4048 Name: remove 4050 Purpose: Lists the properties to be removed from a resource. 4052 Description: Remove instructs that the properties specified in prop 4053 should be removed. Specifying the removal of a property that does 4054 not exist is not an error. All the XML elements in a 'prop' XML 4055 element inside of a 'remove' XML element MUST be empty, as only 4056 the names of properties to be removed are required. 4058 4060 14.24. response XML Element 4062 Name: response 4064 Purpose: Holds a single response describing the effect of a method 4065 on resource and/or its properties. 4067 Description: The 'href' element contains a HTTP URL pointing to a 4068 WebDAV resource when used in the 'response' container. A 4069 particular 'href' value MUST NOT appear more than once as the 4070 child of a 'response' XML element under a 'multistatus' XML 4071 element. This requirement is necessary in order to keep 4072 processing costs for a response to linear time. Essentially, this 4073 prevents having to search in order to group together all the 4074 responses by 'href'. There are, however, no requirements 4075 regarding ordering based on 'href' values. The optional 4076 precondition/postcondition element and 'responsedescription' text 4077 can provide additional information about this resource relative to 4078 the request or result. 4080 4083 14.25. responsedescription XML Element 4085 Name: responsedescription 4087 Purpose: Contains information about a status response within a 4088 Multi-Status. 4090 Description: Provides information suitable to be presented to a 4091 user. 4093 4095 14.26. set XML element 4097 Name: set 4099 Purpose: Lists the property values to be set for a resource. 4101 Description: The 'set' element MUST contain only a 'prop' element. 4102 The elements contained by the 'prop' element inside the 'set' 4103 element MUST specify the name and value of properties that are set 4104 on the resource identified by Request-URI. If a property already 4105 exists then its value is replaced. Language tagging information 4106 appearing in the scope of the 'prop' element (in the "xml:lang" 4107 attribute, if present) MUST be persistently stored along with the 4108 property, and MUST be subsequently retrievable using PROPFIND. 4110 4112 14.27. shared XML Element 4114 Name: shared 4116 Purpose: Specifies a shared lock. 4118 4120 14.28. status XML Element 4122 Name: status 4123 Purpose: Holds a single HTTP status-line. 4125 Value: status-line (defined in Section 6.1 of [RFC2616]) 4127 4129 14.29. timeout XML Element 4131 Name: timeout 4133 Purpose: The number of seconds remaining before a lock expires. 4135 Value: TimeType (defined in Section 10.7). 4137 4139 14.30. write XML Element 4141 Name: write 4143 Purpose: Specifies a write lock. 4145 4147 15. DAV Properties 4149 For DAV properties, the name of the property is also the same as the 4150 name of the XML element that contains its value. In the section 4151 below, the final line of each section gives the element type 4152 declaration using the format defined in [REC-XML]. The "Value" 4153 field, where present, specifies further restrictions on the allowable 4154 contents of the XML element using BNF (i.e., to further restrict the 4155 values of a PCDATA element). 4157 A protected property is one which cannot be changed with a PROPPATCH 4158 request. There may be other requests which would result in a change 4159 to a protected property (as when a LOCK request affects the value of 4160 DAV:lockdiscovery). Note that a given property could be protected on 4161 one type of resource, but not protected on another type of resource. 4163 A computed property is one with a value defined in terms of a 4164 computation (based on the content and other properties of that 4165 resource, or even of some other resource). A computed property is 4166 always a protected property. 4168 COPY and MOVE behavior refers to local COPY and MOVE operations. 4170 For properties defined based on HTTP GET response headers (DAV:get*), 4171 the header value could include LWS as defined in [RFC2616], Section 4172 4.2. Server implementors SHOULD strip LWS from these values before 4173 using as WebDAV property values. 4175 15.1. creationdate Property 4177 Name: creationdate 4179 Purpose: Records the time and date the resource was created. 4181 Value: date-time (defined in [RFC3339], see the ABNF in section 4182 5.6.) 4184 Protected: MAY be protected. Some servers allow DAV:creationdate 4185 to be changed to reflect the time the document was created if that 4186 is more meaningful to the user (rather than the time it was 4187 uploaded). Thus, clients SHOULD NOT use this property in 4188 synchronization logic (use DAV:getetag instead). 4190 COPY/MOVE behaviour: This property value SHOULD be kept during a 4191 MOVE operation, but is normally re-initialized when a resource is 4192 created with a COPY. It should not be set in a COPY. 4194 Description: The DAV:creationdate property SHOULD be defined on all 4195 DAV compliant resources. If present, it contains a timestamp of 4196 the moment when the resource was created. Servers that are 4197 incapable of persistently recording the creation date SHOULD 4198 instead leave it undefined (i.e. report "Not Found"). 4200 4202 15.2. displayname Property 4204 Name: displayname 4206 Purpose: Provides a name for the resource that is suitable for 4207 presentation to a user. 4209 Value: Any text. 4211 Protected: SHOULD NOT be protected. Note that servers implementing 4212 [RFC2518] might have made this a protected property as this is a 4213 new requirement. 4215 COPY/MOVE behaviour: This property value SHOULD be preserved in 4216 COPY and MOVE operations. 4218 Description: Contains a description of the resource that is 4219 suitable for presentation to a user. This property is defined on 4220 the resource, and hence SHOULD have the same value independent of 4221 the Request-URI used to retrieve it (thus computing this property 4222 based on the Request-URI is deprecated). While generic clients 4223 might display the property value to end users, client UI designers 4224 must understand that the method for identifying resources is still 4225 the URL. Changes to DAV:displayname do not issue moves or copies 4226 to the server, but simply change a piece of meta-data on the 4227 individual resource. Two resources can have the same DAV: 4228 displayname value even within the same collection. 4230 4232 15.3. getcontentlanguage Property 4234 Name: getcontentlanguage 4236 Purpose: Contains the Content-Language header value (from Section 4237 14.12 of [RFC2616]) as it would be returned by a GET without 4238 accept headers. 4240 Value: language-tag (language-tag is defined in Section 3.10 of 4241 [RFC2616]). 4243 Protected: SHOULD NOT be protected, so that clients can reset the 4244 language. Note that servers implementing [RFC2518] might have 4245 made this a protected property as this is a new requirement. 4247 COPY/MOVE behaviour: This property value SHOULD be preserved in 4248 COPY and MOVE operations. 4250 Description: The DAV:getcontentlanguage property MUST be defined on 4251 any DAV compliant resource that returns the Content-Language 4252 header on a GET. 4254 4256 15.4. getcontentlength Property 4258 Name: getcontentlength 4260 Purpose: Contains the Content-Length header returned by a GET 4261 without accept headers. 4263 Value: See Section 14.13 of [RFC2616]. 4265 Protected: This property is computed, therefore protected. 4267 Description: The DAV:getcontentlength property MUST be defined on 4268 any DAV compliant resource that returns the Content-Length header 4269 in response to a GET. 4271 COPY/MOVE behaviour: This property value is dependent on the size 4272 of the destination resource, not the value of the property on the 4273 source resource. 4275 4277 15.5. getcontenttype Property 4279 Name: getcontenttype 4281 Purpose: Contains the Content-Type header value (from Section 14.17 4282 of [RFC2616]) as it would be returned by a GET without accept 4283 headers. 4285 Value: media-type (defined in Section 3.7 of [RFC2616]) 4287 Protected: Potentially protected if the server prefers to assign 4288 content types on its own (see also discussion in Section 9.7.1). 4290 COPY/MOVE behaviour: This property value SHOULD be preserved in 4291 COPY and MOVE operations. 4293 Description: This property MUST be defined on any DAV compliant 4294 resource that returns the Content-Type header in response to a 4295 GET. 4297 4299 15.6. getetag Property 4301 Name: getetag 4303 Purpose: Contains the ETag header value (from Section 14.19 of 4304 [RFC2616]) as it would be returned by a GET without accept 4305 headers. 4307 Value: entity-tag (defined in Section 3.11 of [RFC2616]) 4309 Protected: MUST be protected because this value is created and 4310 controlled by the server. 4312 COPY/MOVE behaviour: This property value is dependent on the final 4313 state of the destination resource, not the value of the property 4314 on the source resource. Also note the considerations in 4315 Section 8.8. 4317 Description: The getetag property MUST be defined on any DAV 4318 compliant resource that returns the Etag header. Refer to Section 4319 3.11 of RFC2616 for a complete definition of the semantics of an 4320 ETag, and to Section 8.6 for a discussion of ETags in WebDAV. 4322 4324 15.7. getlastmodified Property 4326 Name: getlastmodified 4328 Purpose: Contains the Last-Modified header value (from Section 4329 14.29 of [RFC2616]) as it would be returned by a GET method 4330 without accept headers. 4332 Value: rfc1123-date (defined in Section 3.3.1 of [RFC2616]) 4334 Protected: SHOULD be protected because some clients may rely on the 4335 value for appropriate caching behavior, or on the value of the 4336 Last-Modified header to which this property is linked. 4338 COPY/MOVE behaviour: This property value is dependent on the last 4339 modified date of the destination resource, not the value of the 4340 property on the source resource. Note that some server 4341 implementations use the file system date modified value for the 4342 DAV:getlastmodified value, and this can be preserved in a MOVE 4343 even when the HTTP Last-Modified value SHOULD change. Note that 4344 since [RFC2616] requires clients to use ETags where provided, a 4345 server implementing ETags can count on clients using a much better 4346 mechanism than modification dates for offline synchronization or 4347 cache control. Also note the considerations in Section 8.8. 4349 Description: Note that the last-modified date on a resource SHOULD 4350 only reflect changes in the body (the GET responses) of the 4351 resource. A change in a property only SHOULD NOT cause the last- 4352 modified date to change, because clients MAY rely on the last- 4353 modified date to know when to overwrite the existing body. The 4354 DAV:getlastmodified property MUST be defined on any DAV compliant 4355 resource that returns the Last-Modified header in response to a 4356 GET. 4358 4360 15.8. lockdiscovery Property 4362 Name: lockdiscovery 4364 Purpose: Describes the active locks on a resource 4366 Protected: MUST be protected. Clients change the list of locks 4367 through LOCK and UNLOCK, not through PROPPATCH. 4369 COPY/MOVE behaviour: The value of this property depends on the lock 4370 state of the destination, not on the locks of the source resource. 4371 Recall that locks are not moved in a MOVE operation. 4373 Description: Returns a listing of who has a lock, what type of lock 4374 he has, the timeout type and the time remaining on the timeout, 4375 and the associated lock token. If there are no locks, but the 4376 server supports locks, the property will be present but contain 4377 zero 'activelock' elements. If there is one or more lock, an 4378 'activelock' element appears for each lock on the resource. This 4379 property is NOT lockable with respect to write locks (Section 7). 4381 4383 15.8.1. Example - Retrieving DAV:lockdiscovery 4385 >>Request 4387 PROPFIND /container/ HTTP/1.1 4388 Host: www.example.com 4389 Content-Length: xxxx 4390 Content-Type: application/xml; charset="utf-8" 4392 4393 4394 4395 4397 >>Response 4399 HTTP/1.1 207 Multi-Status 4400 Content-Type: application/xml; charset="utf-8" 4401 Content-Length: xxxx 4403 4404 4405 4406 http://www.example.com/container/ 4407 4408 4409 4410 4411 4412 4413 0 4414 Jane Smith 4415 Infinite 4416 4417 urn:uuid:f81de2ad-7f3d-a1b2-4f3c-00a0c91a9d76 4419 4420 4421 http://www.example.com/container/ 4422 4423 4424 4425 4426 HTTP/1.1 200 OK 4427 4428 4429 4431 This resource has a single exclusive write lock on it, with an 4432 infinite timeout. 4434 15.9. resourcetype Property 4436 Name: resourcetype 4438 Purpose: Specifies the nature of the resource. 4440 Protected: SHOULD be protected. Resource type is generally decided 4441 through the operation creating the resource (MKCOL vs PUT), not by 4442 PROPPATCH. 4444 COPY/MOVE behaviour: Generally a COPY/MOVE of a resource results in 4445 the same type of resource at the destination. 4447 Description: MUST be defined on all DAV compliant resources. Each 4448 child element identifies a specific type the resource belongs to, 4449 such as 'collection', which is the only resource type defined by 4450 this specification (see Section 14.3). If the element contains 4451 the 'collection' child element plus additional unrecognized 4452 elements, it should generally be treated as a collection. If the 4453 element contains no recognized child elements, it should be 4454 treated as a non-collection resource. The default value is empty. 4455 This element MUST NOT contain text or mixed content. Any custom 4456 child element is considered to be an identifier for a resource 4457 type. 4459 Example: (fictional example to show extensibility) 4461 4462 4463 4464 4466 15.10. supportedlock Property 4468 Name: supportedlock 4470 Purpose: To provide a listing of the lock capabilities supported by 4471 the resource. 4473 Protected: MUST be protected. Servers determine what lock 4474 mechanisms are supported, not clients. 4476 COPY/MOVE behaviour: This property value is dependent on the kind 4477 of locks supported at the destination, not on the value of the 4478 property at the source resource. Servers attempting to COPY to a 4479 destination should not attempt to set this property at the 4480 destination. 4482 Description: Returns a listing of the combinations of scope and 4483 access types which may be specified in a lock request on the 4484 resource. Note that the actual contents are themselves controlled 4485 by access controls so a server is not required to provide 4486 information the client is not authorized to see. This property is 4487 NOT lockable with respect to write locks (Section 7). 4489 4491 15.10.1. Example - Retrieving DAV:supportedlock 4493 >>Request 4495 PROPFIND /container/ HTTP/1.1 4496 Host: www.example.com 4497 Content-Length: xxxx 4498 Content-Type: application/xml; charset="utf-8" 4500 4501 4502 4503 4505 >>Response 4507 HTTP/1.1 207 Multi-Status 4508 Content-Type: application/xml; charset="utf-8" 4509 Content-Length: xxxx 4511 4512 4513 4514 http://www.example.com/container/ 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 HTTP/1.1 200 OK 4529 4530 4531 4533 16. Precondition/postcondition XML elements 4535 As introduced in Section 8.7, extra information on error conditions 4536 can be included in the body of many status responses. This section 4537 makes requirements on the use of the error body mechanism and 4538 introduces a number of precondition and postcondition codes. 4540 A "precondition" of a method describes the state of the server that 4541 must be true for that method to be performed. A "postcondition" of a 4542 method describes the state of the server that must be true after that 4543 method has been completed. 4545 Each precondition and postcondition has a unique XML element 4546 associated with it. In a 207 Multi-Status response, the XML element 4547 MUST appear inside an 'error' element in the appropriate 'propstat or 4548 'response' element depending on whether the condition applies to one 4549 or more properties or to the resource as a whole. In all other error 4550 responses, the XML element MUST be returned as the child of a top- 4551 level 'error' element in the response body, unless otherwise 4552 negotiated by the request, along with an appropriate response status. 4553 The most common response status codes are 403 (Forbidden) if the 4554 request should not be repeated because it will always fail, and 409 4555 (Conflict) if it is expected that the user might be able to resolve 4556 the conflict and resubmit the request. The 'error' element MAY 4557 contain child elements with specific error information and MAY be 4558 extended with any custom child elements. 4560 This mechanism does not take the place of using a correct numeric 4561 status code as defined here or in HTTP, because the client MUST 4562 always be able to take a reasonable course of action based only on 4563 the numeric code. However, it does remove the need to define new 4564 numeric codes. The new machine-readable codes used for this purpose 4565 are XML elements classified as preconditions and postconditions, so 4566 naturally any group defining a new condition code can use their own 4567 namespace. As always, the "DAV:" namespace is reserved for use by 4568 IETF-chartered WebDAV working groups. 4570 A server supporting this specification SHOULD use the XML error 4571 whenever a precondition or postcondition defined in this document is 4572 violated. For error conditions not specified in this document, the 4573 server MAY simply choose an appropriate numeric status and leave the 4574 response body blank. However, a server MAY instead use a custom 4575 condition code and other supporting text, because even when clients 4576 do not automatically recognize condition codes they can be quite 4577 useful in interoperability testing and debugging. 4579 Example - Response with precondition code 4580 >>Response 4582 HTTP/1.1 423 Locked 4583 Content-Type: application/xml; charset="utf-8" 4584 Content-Length: xxxx 4586 4587 4588 4589 /workspace/webdav/ 4590 4591 4593 In this example, a client unaware of a "Depth: infinity" lock on the 4594 parent collection "/workspace/webdav/" attempted to modify the 4595 collection member "/workspace/webdav/proposal.doc". 4597 Some other useful preconditions and postconditions have been defined 4598 in other specifications extending WebDAV, such as [RFC3744] (see 4599 particularly Section 7.1.1), [RFC3253], and [RFC3648]. 4601 All these elements are in the "DAV:" namespace. If not specified 4602 otherwise, the content for each condition's XML element is defined to 4603 be empty. 4605 Name: lock-token-matches-request-uri 4607 Use with: 409 Conflict 4609 Purpose: (precondition) -- A request may include a Lock-Token header 4610 to identify a lock for the UNLOCK method. However, if the 4611 Request-URI does not fall within the scope of the lock identified 4612 by the token, the server SHOULD use this error. The lock may have 4613 a scope that does not include the Request-URI, or the lock could 4614 have disappeared, or the token may be invalid. 4616 Name: lock-token-submitted (precondition) 4618 Use with: 423 Locked 4620 Purpose: The request could not succeed because a lock token should 4621 have been submitted. This element, if present, MUST contain at 4622 least one URL of a locked resource that prevented the request. In 4623 cases of MOVE, COPY and DELETE where collection locks are 4624 involved, it can be difficult for the client to find out which 4625 locked resource made the request fail -- but the server is only 4626 resonsible for returning one such locked resource. The server MAY 4627 return every locked resource that prevented the request from 4628 succeeding if it knows them all. 4630 4632 Name: no-conflicting-lock (precondition) 4634 Use with: Typically 423 Locked 4636 Purpose: A LOCK request failed due the presence of an already 4637 existing conflicting lock. Note that a lock can be in conflict 4638 although the resource to which the request was directed is only 4639 indirectly locked. In this case, the precondition code can be 4640 used to inform the client about the resource which is the root of 4641 the conflicting lock, avoiding a separate lookup of the 4642 "lockdiscovery" property. 4644 4646 Name: no-external-entities 4648 Use with: 403 Forbidden 4650 Purpose: (precondition) -- If the server rejects a client request 4651 because the request body contains an external entity, the server 4652 SHOULD use this error. 4654 Name: preserved-live-properties 4656 Use with: 409 Conflict 4658 Purpose: (postcondition) -- The server received an otherwise-valid 4659 MOVE or COPY request, but cannot maintain the live properties with 4660 the same behavior at the destination. It may be that the server 4661 only supports some live properties in some parts of the 4662 repository, or simply has an internal error. 4664 Name: propfind-finite-depth 4666 Use with: 403 Forbidden 4668 Purpose: (precondition) -- This server does not allow infinite-depth 4669 PROPFIND requests on collections. 4671 Name: cannot-modify-protected-property 4672 Use with: 403 Forbidden 4674 Purpose: (precondition) -- The client attempted to set a protected 4675 property in a PROPPATCH (such as DAV:getetag). See also 4676 [RFC3253], Section 3.12. 4678 17. XML Extensibility in DAV 4680 The XML namespace extension ([REC-XML-NAMES]) is used in this 4681 specification in order to allow for new XML elements to be added 4682 without fear of colliding with other element names. Although WebDAV 4683 request and response bodies can be extended by arbitrary XML 4684 elements, which can be ignored by the message recipient, an XML 4685 element in the "DAV:" namespace SHOULD NOT be used in the request or 4686 response body unless that XML element is explicitly defined in an 4687 IETF RFC reviewed by a WebDAV working group. 4689 For WebDAV to be both extensibile and backwards-compatible, both 4690 clients and servers need to know how to behave when unexpected or 4691 unrecognized command extensions are received. For XML processing, 4692 this means that clients and servers MUST process received XML 4693 documents as if unexpected elements and attributes (and all children 4694 of unrecognized elements) were not there. An unexpected element or 4695 attribute includes one which may be used in another context but is 4696 not expected here. Ignoring such items for purposes of processing 4697 can of course be consistent with logging all information or 4698 presenting for debugging. 4700 This restriction also applies to the processing, by clients, of DAV 4701 property values where unexpected XML elements SHOULD be ignored 4702 unless the property's schema declares otherwise. 4704 This restriction does not apply to setting dead DAV properties on the 4705 server where the server MUST record all XML elements. 4707 Additionally, this restriction does not apply to the use of XML where 4708 XML happens to be the content type of the entity body, for example, 4709 when used as the body of a PUT. 4711 Processing instructions in XML SHOULD be ignored by recipients. 4712 Thus, specifications extending WebDAV SHOULD NOT use processing 4713 instructions to define normative behavior. 4715 XML DTD fragments are included for all the XML elements defined in 4716 this specification. However, correct XML will not be valid according 4717 to any DTD due to namespace usage and extension rules. In 4718 particular: 4720 o Elements (from this specification) are in the "DAV:" namespace, 4722 o Element ordering is irrelevant unless otherwise stated, 4724 o Extension attributes MAY be added, 4725 o For element type definitions of "ANY", the normative text 4726 definition for that element defines what can be in it and what 4727 that means. 4729 o For element type definitions of "#PCDATA", extension elements MUST 4730 NOT be added. 4732 o For other element type definitions, including "EMPTY", extension 4733 elements MAY be added. 4735 Note that this means that elements containing elements cannot be 4736 extended to contain text, and vice versa. 4738 With DTD validation relaxed by the rules above, the constraints 4739 described by the DTD fragments are normative (see for example 4740 Appendix A). A recipient of a WebDAV message with an XML body MUST 4741 NOT validate the XML document according to any hard-coded or 4742 dynamically-declared DTD. 4744 Note that this section describes backwards-compatible extensibility 4745 rules. There might also be times when an extension is designed not 4746 to be backwards-compatible, for example defining an extension that 4747 reuses an XML element defined in this document but omitting one of 4748 the child elements required by the DTDs in this specification. 4750 18. DAV Compliance Classes 4752 A DAV compliant resource can advertise several classes of compliance. 4753 A client can discover the compliance classes of a resource by 4754 executing OPTIONS on the resource, and examining the "DAV" header 4755 which is returned. Note particularly that resources are spoken of as 4756 being compliant, rather than servers. That is because theoretically 4757 some resources on a server could support different feature sets. 4758 E.g. a server could have a sub-repository where an advanced feature 4759 like versioning was supported, even if that feature was not supported 4760 on all sub-repositories. 4762 Since this document describes extensions to the HTTP/1.1 protocol, 4763 minimally all DAV compliant resources, clients, and proxies MUST be 4764 compliant with [RFC2616]. 4766 A resource that is class 2 or class 3 compliant must also be class 1 4767 compliant. 4769 18.1. Class 1 4771 A class 1 compliant resource MUST meet all "MUST" requirements in all 4772 sections of this document. 4774 Class 1 compliant resources MUST return, at minimum, the value "1" in 4775 the DAV header on all responses to the OPTIONS method. 4777 18.2. Class 2 4779 A class 2 compliant resource MUST meet all class 1 requirements and 4780 support the LOCK method, the DAV:supportedlock property, the DAV: 4781 lockdiscovery property, the Time-Out response header and the Lock- 4782 Token request header. A class "2" compliant resource SHOULD also 4783 support the Time-Out request header and the 'owner' XML element. 4785 Class 2 compliant resources MUST return, at minimum, the values "1" 4786 and "2" in the DAV header on all responses to the OPTIONS method. 4788 18.3. Class 3 4790 A resource can explicitly advertise its support for the revisions to 4791 [RFC2518] made in this document. Class 1 MUST be supported as well. 4792 Class 2 MAY be supported. Advertising class 3 support in addition to 4793 class 1 and 2 means that the server supports all the requirements in 4794 this specification. Advertising class 3 and class 1 support, but not 4795 class 2, means that the server supports all the requirements in this 4796 specification except possibly those that involve locking support. 4798 Example: 4800 DAV: 1, 3 4802 19. Internationalization Considerations 4804 In the realm of internationalization, this specification complies 4805 with the IETF Character Set Policy [RFC2277]. In this specification, 4806 human-readable fields can be found either in the value of a property, 4807 or in an error message returned in a response entity body. In both 4808 cases, the human-readable content is encoded using XML, which has 4809 explicit provisions for character set tagging and encoding, and 4810 requires that XML processors read XML elements encoded, at minimum, 4811 using the UTF-8 [RFC3629] and UTF-16 encodings of the ISO 10646 4812 multilingual plane. XML examples in this specification demonstrate 4813 use of the charset parameter of the Content-Type header, as defined 4814 in [RFC3023], as well as the XML declarations which provide charset 4815 identification information for MIME and XML processors. 4817 XML also provides a language tagging capability for specifying the 4818 language of the contents of a particular XML element. The "xml:lang" 4819 attribute appears on an XML element to identify the language of its 4820 content and attributes. See [REC-XML] for definitions of values and 4821 scoping. 4823 WebDAV applications MUST support the character set tagging, character 4824 set encoding, and the language tagging functionality of the XML 4825 specification. Implementors of WebDAV applications are strongly 4826 encouraged to read "XML Media Types" [RFC3023] for instruction on 4827 which MIME media type to use for XML transport, and on use of the 4828 charset parameter of the Content-Type header. 4830 Names used within this specification fall into four categories: names 4831 of protocol elements such as methods and headers, names of XML 4832 elements, names of properties, and names of conditions. Naming of 4833 protocol elements follows the precedent of HTTP, using English names 4834 encoded in USASCII for methods and headers. Since these protocol 4835 elements are not visible to users, and are simply long token 4836 identifiers, they do not need to support multiple languages. 4837 Similarly, the names of XML elements used in this specification are 4838 not visible to the user and hence do not need to support multiple 4839 languages. 4841 WebDAV property names are qualified XML names (pairs of XML namespace 4842 name and local name). Although some applications (e.g., a generic 4843 property viewer) will display property names directly to their users, 4844 it is expected that the typical application will use a fixed set of 4845 properties, and will provide a mapping from the property name and 4846 namespace to a human-readable field when displaying the property name 4847 to a user. It is only in the case where the set of properties is not 4848 known ahead of time that an application need display a property name 4849 to a user. We recommend that applications provide human-readable 4850 property names wherever feasible. 4852 For error reporting, we follow the convention of HTTP/1.1 status 4853 codes, including with each status code a short, English description 4854 of the code (e.g., 423 (Locked)). While the possibility exists that 4855 a poorly crafted user agent would display this message to a user, 4856 internationalized applications will ignore this message, and display 4857 an appropriate message in the user's language and character set. 4859 Since interoperation of clients and servers does not require locale 4860 information, this specification does not specify any mechanism for 4861 transmission of this information. 4863 20. Security Considerations 4865 This section is provided to detail issues concerning security 4866 implications of which WebDAV applications need to be aware. 4868 All of the security considerations of HTTP/1.1 (discussed in 4869 [RFC2616]) and XML (discussed in [RFC3023]) also apply to WebDAV. In 4870 addition, the security risks inherent in remote authoring require 4871 stronger authentication technology, introduce several new privacy 4872 concerns, and may increase the hazards from poor server design. 4873 These issues are detailed below. 4875 20.1. Authentication of Clients 4877 Due to their emphasis on authoring, WebDAV servers need to use 4878 authentication technology to protect not just access to a network 4879 resource, but the integrity of the resource as well. Furthermore, 4880 the introduction of locking functionality requires support for 4881 authentication. 4883 A password sent in the clear over an insecure channel is an 4884 inadequate means for protecting the accessibility and integrity of a 4885 resource as the password may be intercepted. Since Basic 4886 authentication for HTTP/1.1 performs essentially clear text 4887 transmission of a password, Basic authentication MUST NOT be used to 4888 authenticate a WebDAV client to a server unless the connection is 4889 secured by TLS. Furthermore, a WebDAV server MUST NOT send a Basic 4890 authentication challenge in a WWW-Authenticate header unless the 4891 connection is secured by TLS. 4893 WebDAV applications MUST support the Digest authentication scheme 4894 [RFC2617]. Since Digest authentication verifies that both parties to 4895 a communication know a shared secret, a password, without having to 4896 send that secret in the clear, Digest authentication avoids the 4897 security problems inherent in Basic authentication while providing a 4898 level of authentication which is useful in a wide range of scenarios. 4900 20.2. Denial of Service 4902 Denial of service attacks are of special concern to WebDAV servers. 4903 WebDAV plus HTTP enables denial of service attacks on every part of a 4904 system's resources. 4906 o The underlying storage can be attacked by PUTting extremely large 4907 files. 4909 o Asking for recursive operations on large collections can attack 4910 processing time. 4912 o Making multiple pipelined requests on multiple connections can 4913 attack network connections. 4915 WebDAV servers need to be aware of the possibility of a denial of 4916 service attack at all levels. The proper response to such an attack 4917 MAY be to simply drop the connection, or if the server is able to 4918 make a response, the server MAY use a 400-level status request such 4919 as 400 (Bad Request) and indicate why the request was refused (a 500- 4920 level status response would indicate that the problem is with the 4921 server, whereas unintentional DOS attacks are something the client is 4922 capable of remedying). 4924 20.3. Security through Obscurity 4926 WebDAV provides, through the PROPFIND method, a mechanism for listing 4927 the member resources of a collection. This greatly diminishes the 4928 effectiveness of security or privacy techniques that rely only on the 4929 difficulty of discovering the names of network resources. Users of 4930 WebDAV servers are encouraged to use access control techniques to 4931 prevent unwanted access to resources, rather than depending on the 4932 relative obscurity of their resource names. 4934 20.4. Privacy Issues Connected to Locks 4936 When submitting a lock request a user agent may also submit an 4937 'owner' XML field giving contact information for the person taking 4938 out the lock (for those cases where a person, rather than a robot, is 4939 taking out the lock). This contact information is stored in a DAV: 4940 lockdiscovery property on the resource, and can be used by other 4941 collaborators to begin negotiation over access to the resource. 4942 However, in many cases this contact information can be very private, 4943 and should not be widely disseminated. Servers SHOULD limit read 4944 access to the DAV:lockdiscovery property as appropriate. 4945 Furthermore, user agents SHOULD provide control over whether contact 4946 information is sent at all, and if contact information is sent, 4947 control over exactly what information is sent. 4949 20.5. Privacy Issues Connected to Properties 4951 Since property values are typically used to hold information such as 4952 the author of a document, there is the possibility that privacy 4953 concerns could arise stemming from widespread access to a resource's 4954 property data. To reduce the risk of inadvertent release of private 4955 information via properties, servers are encouraged to develop access 4956 control mechanisms that separate read access to the resource body and 4957 read access to the resource's properties. This allows a user to 4958 control the dissemination of their property data without overly 4959 restricting access to the resource's contents. 4961 20.6. Implications of XML Entities 4963 XML supports a facility known as "external entities", defined in 4964 Section 4.2.2 of [REC-XML], which instruct an XML processor to 4965 retrieve and include additional XML. An external XML entity can be 4966 used to append or modify the document type declaration (DTD) 4967 associated with an XML document. An external XML entity can also be 4968 used to include XML within the content of an XML document. For non- 4969 validating XML, such as the XML used in this specification, including 4970 an external XML entity is not required by XML. However, XML does 4971 state that an XML processor may, at its discretion, include the 4972 external XML entity. 4974 External XML entities have no inherent trustworthiness and are 4975 subject to all the attacks that are endemic to any HTTP GET request. 4976 Furthermore, it is possible for an external XML entity to modify the 4977 DTD, and hence affect the final form of an XML document, in the worst 4978 case significantly modifying its semantics, or exposing the XML 4979 processor to the security risks discussed in [RFC3023]. Therefore, 4980 implementers must be aware that external XML entities should be 4981 treated as untrustworthy. If a server implementor chooses not to 4982 handle external XML entities, it SHOULD respond to requests 4983 containing external entities with the 'no-external-entities' 4984 condition code. 4986 There is also the scalability risk that would accompany a widely 4987 deployed application which made use of external XML entities. In 4988 this situation, it is possible that there would be significant 4989 numbers of requests for one external XML entity, potentially 4990 overloading any server which fields requests for the resource 4991 containing the external XML entity. 4993 Furthermore, there's also a risk based on the evaluation of "internal 4994 entities" as defined in Section 4.2.2 of [REC-XML]. A small, 4995 carefully crafted request using nested internal entities may require 4996 enormous amounts of memory and/or processing time to process. Server 4997 implementors should be aware of this risk and configure their XML 4998 parsers so that requests like these can be detected and rejected as 4999 early as possible. 5001 20.7. Risks Connected with Lock Tokens 5003 This specification encourages the use of "A Universally Unique 5004 Identifier (UUID) URN Namespace" ([RFC4122]) for lock tokens 5005 (Section 6.5), in order to guarantee their uniqueness across space 5006 and time. Version 1 UUIDs (defined in Section 4) MAY contain a 5007 "node" field that "consists of an IEEE 802 MAC address, usually the 5008 host address. For systems with multiple IEEE addresses, any 5009 available one can be used". Since a WebDAV server will issue many 5010 locks over its lifetime, the implication is that it may also be 5011 publicly exposing its IEEE 802 address. 5013 There are several risks associated with exposure of IEEE 802 5014 addresses. Using the IEEE 802 address: 5016 o It is possible to track the movement of hardware from subnet to 5017 subnet. 5019 o It may be possible to identify the manufacturer of the hardware 5020 running a WebDAV server. 5022 o It may be possible to determine the number of each type of 5023 computer running WebDAV. 5025 This risk only applies to host address based UUID versions. Section 5026 4 of [RFC4122] describes several other mechanisms for generating 5027 UUIDs that do not involve the host address and therefore do not 5028 suffer from this risk. 5030 20.8. Hosting Malicious Content 5032 HTTP has the ability to host programs which are executed on client 5033 machines. These programs can take many forms including web scripts, 5034 executables, plug in modules, and macros in documents. WebDAV does 5035 not change any of the security concerns around these programs yet 5036 often WebDAV is used in contexts where a wide range of users can 5037 publish documents on a server. The server might not have a close 5038 trust relationship with the author that is publishing the document. 5039 Servers that allow clients to publish arbitrary content can usefully 5040 implement precautions to check that content published to the server 5041 is not harmful to other clients. Servers could do this by techniques 5042 such as restricting the types of content that is allowed to be 5043 published and running virus and malware detection software on 5044 published content. Servers can also mitigate the risk by having 5045 appropriate access restriction and authentication of users that are 5046 allowed to publish content to the server. 5048 21. IANA Considerations 5050 21.1. New URI Schemes 5052 This specification defines two URI schemes: 5054 1. the "opaquelocktoken" scheme defined in Appendix C, and 5056 2. the "DAV" URI scheme, which historically was used in [RFC2518] to 5057 disambiguate WebDAV property and XML element names and which 5058 continues to be used for that purpose in this specification and 5059 others extending WebDAV. Creation of identifiers in the "DAV:" 5060 namespace is controlled by the IETF. 5062 Note that defining new URI schemes for XML namespaces is now 5063 discouraged. "DAV:" was defined before standard best practices 5064 emerged. 5066 21.2. XML Namespaces 5068 XML namespaces disambiguate WebDAV property names and XML elements. 5069 Any WebDAV user or application can define a new namespace in order to 5070 create custom properties or extend WebDAV XML syntax. IANA does not 5071 need to manage such namespaces, property names or element names. 5073 21.3. Message Header Fields 5075 The message header fields below should be added to the permanent 5076 registry (see [RFC3864]). 5078 21.3.1. DAV 5080 Header field name: DAV 5082 Applicable protocol: http 5084 Status: standard 5086 Author/Change controller: IETF 5088 Specification document: this specification (Section 10.1) 5090 21.3.2. Depth 5092 Header field name: Depth 5094 Applicable protocol: http 5095 Status: standard 5097 Author/Change controller: IETF 5099 Specification document: this specification (Section 10.2) 5101 21.3.3. Destination 5103 Header field name: Destination 5105 Applicable protocol: http 5107 Status: standard 5109 Author/Change controller: IETF 5111 Specification document: this specification (Section 10.3) 5113 21.3.4. If 5115 Header field name: If 5117 Applicable protocol: http 5119 Status: standard 5121 Author/Change controller: IETF 5123 Specification document: this specification (Section 10.4) 5125 21.3.5. Lock-Token 5127 Header field name: Lock-Token 5129 Applicable protocol: http 5131 Status: standard 5133 Author/Change controller: IETF 5135 Specification document: this specification (Section 10.5) 5137 21.3.6. Overwrite 5139 Header field name: Overwrite 5141 Applicable protocol: http 5142 Status: standard 5144 Author/Change controller: IETF 5146 Specification document: this specification (Section 10.6) 5148 21.3.7. Timeout 5150 Header field name: Timeout 5152 Applicable protocol: http 5154 Status: standard 5156 Author/Change controller: IETF 5158 Specification document: this specification (Section 10.7) 5160 22. Acknowledgements 5162 A specification such as this thrives on piercing critical review and 5163 withers from apathetic neglect. The authors gratefully acknowledge 5164 the contributions of the following people, whose insights were so 5165 valuable at every stage of our work. 5167 Contributors to RFC2518 5169 Terry Allen, Harald Alvestrand, Jim Amsden, Becky Anderson, Alan 5170 Babich, Sanford Barr, Dylan Barrell, Bernard Chester, Tim Berners- 5171 Lee, Dan Connolly, Jim Cunningham, Ron Daniel, Jr., Jim Davis, Keith 5172 Dawson, Mark Day, Brian Deen, Martin Duerst, David Durand, Lee 5173 Farrell, Chuck Fay, Wesley Felter, Roy Fielding, Mark Fisher, Alan 5174 Freier, George Florentine, Jim Gettys, Phill Hallam-Baker, Dennis 5175 Hamilton, Steve Henning, Mead Himelstein, Alex Hopmann, Andre van der 5176 Hoek, Ben Laurie, Paul Leach, Ora Lassila, Karen MacArthur, Steven 5177 Martin, Larry Masinter, Michael Mealling, Keith Moore, Thomas Narten, 5178 Henrik Nielsen, Kenji Ota, Bob Parker, Glenn Peterson, Jon Radoff, 5179 Saveen Reddy, Henry Sanders, Christopher Seiwald, Judith Slein, Mike 5180 Spreitzer, Einar Stefferud, Greg Stein, Ralph Swick, Kenji Takahashi, 5181 Richard N. Taylor, Robert Thau, John Turner, Sankar Virdhagriswaran, 5182 Fabio Vitali, Gregory Woodhouse, and Lauren Wood. 5184 Two from this list deserve special mention. The contributions by 5185 Larry Masinter have been invaluable, both in helping the formation of 5186 the working group and in patiently coaching the authors along the 5187 way. In so many ways he has set high standards we have toiled to 5188 meet. The contributions of Judith Slein in clarifying the 5189 requirements, and in patiently reviewing draft after draft, both 5190 improved this specification and expanded our minds on document 5191 management. 5193 We would also like to thank John Turner for developing the XML DTD. 5195 The authors of RFC2518 were Yaron Goland, Jim Whitehead, A. Faizi, 5196 Steve Carter and D. Jensen. Although their names had to be removed 5197 due to IETF author count restrictions they can take credit for the 5198 majority of the design of WebDAV. 5200 Additional Acknowledgements for This Specification 5202 Significant contributors of text for this specification are listed as 5203 contributors in the section below. We must also gratefully 5204 acknowledge Geoff Clemm, Joel Soderberg, and Dan Brotsky for hashing 5205 out specific text on the list or in meetings. Joe Hildebrand and 5206 Cullen Jennings helped close many issues. Barry Lind described an 5207 additional security consideration and Cullen Jennings provided text 5208 for that consideration. Jason Crawford tracked issue status for this 5209 document for a period of years, followed by Elias Sinderson. 5211 23. Contributors to This Specification 5213 Julian Reschke, 5214 bytes GmbH, 5215 Hafenweg 16, 48155 Muenster, Germany, 5216 Email: julian.reschke@greenbytes.de 5218 Elias Sinderson 5219 University of California, Santa Cruz 5220 1156 High Street, Santa Cruz, CA 95064 5221 Email: elias@cse.ucsc.edu 5223 Jim Whitehead, 5224 University of California, Santa Cruz 5225 1156 High Street, Santa Cruz, CA 95064 5226 Email: ejw@soe.ucsc.edu 5228 24. Authors of RFC2518 5230 Y. Y. Goland, 5231 Microsoft Corporation, 5232 One Microsoft Way, 5233 Redmond, WA 98052-6399. 5234 Email: yarong@microsoft.com. 5236 E. J. Whitehead, Jr., 5237 Dept. Of Information and Computer Science, 5238 University of California, Irvine, 5239 Irvine, CA 92697-3425. 5240 Email: ejw@ics.uci.edu. 5242 A. Faizi, 5243 Netscape, 5244 685 East Middlefield Road, 5245 Mountain View, CA 94043. 5246 Email: asad@netscape.com. 5248 S. R. Carter, 5249 Novell, 5250 1555 N. Technology Way, 5251 M/S ORM F111, 5252 Orem, UT 84097-2399. 5253 Email: srcarter@novell.com. 5255 D. Jensen, 5256 Novell, 5257 1555 N. Technology Way, 5258 M/S ORM F111, 5259 Orem, UT 84097-2399. 5260 Email: dcjensen@novell.com. 5262 25. References 5264 25.1. Normative References 5266 [REC-XML] Bray, T., Paoli, J., Sperberg-McQueen, C., Maler, E., and 5267 F. Yergeau, "Extensible Markup Language (XML) 1.0 (Third 5268 Edition)", W3C REC-xml-20040204, February 2004, 5269 . 5271 [REC-XML-INFOSET] 5272 Cowan, J. and R. Tobin, "XML Information Set (Second 5273 Edition)", W3C REC-xml-infoset-20040204, February 2004, 5274 . 5276 [REC-XML-NAMES] 5277 Bray, T., Hollander, D., and A. Layman, "Namespaces in 5278 XML", W3C REC-xml-names-19990114, January 1999, 5279 . 5281 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 5282 Requirement Levels", BCP 14, RFC 2119, March 1997. 5284 [RFC2277] Alvestrand, H., "IETF Policy on Character Sets and 5285 Languages", BCP 18, RFC 2277, January 1998. 5287 [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., 5288 Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext 5289 Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. 5291 [RFC2617] Franks, J., Hallam-Baker, P., Hostetler, J., Lawrence, S., 5292 Leach, P., Luotonen, A., and L. Stewart, "HTTP 5293 Authentication: Basic and Digest Access Authentication", 5294 RFC 2617, June 1999. 5296 [RFC3339] Klyne, G., Ed. and C. Newman, "Date and Time on the 5297 Internet: Timestamps", RFC 3339, July 2002. 5299 [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO 5300 10646", STD 63, RFC 3629, November 2003. 5302 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 5303 Resource Identifier (URI): Generic Syntax", STD 66, 5304 RFC 3986, January 2005. 5306 [RFC4122] Leach, P., Mealling, M., and R. Salz, "A Universally 5307 Unique IDentifier (UUID) URN Namespace", RFC 4122, 5308 July 2005. 5310 25.2. Informational References 5312 [I-D.draft-whitehead-http-etag] 5313 Whitehead, J., "Design Considerations for State 5314 Identifiers in HTTP and WebDAV", 5315 draft-whitehead-http-etag-00 (work in progress), 5316 February 2006. 5318 [RFC2291] Slein, J., Vitali, F., Whitehead, E., and D. Durand, 5319 "Requirements for a Distributed Authoring and Versioning 5320 Protocol for the World Wide Web", RFC 2291, February 1998. 5322 [RFC2518] Goland, Y., Whitehead, E., Faizi, A., Carter, S., and D. 5323 Jensen, "HTTP Extensions for Distributed Authoring -- 5324 WEBDAV", RFC 2518, February 1999. 5326 [RFC3023] Murata, M., St. Laurent, S., and D. Kohn, "XML Media 5327 Types", RFC 3023, January 2001. 5329 [RFC3253] Clemm, G., Amsden, J., Ellison, T., Kaler, C., and J. 5330 Whitehead, "Versioning Extensions to WebDAV (Web 5331 Distributed Authoring and Versioning)", RFC 3253, 5332 March 2002. 5334 [RFC3648] Whitehead, J. and J. Reschke, Ed., "Web Distributed 5335 Authoring and Versioning (WebDAV) Ordered Collections 5336 Protocol", RFC 3648, December 2003. 5338 [RFC3744] Clemm, G., Reschke, J., Sedlar, E., and J. Whitehead, "Web 5339 Distributed Authoring and Versioning (WebDAV) Access 5340 Control Protocol", RFC 3744, May 2004. 5342 [RFC3864] Klyne, G., Nottingham, M., and J. Mogul, "Registration 5343 Procedures for Message Header Fields", BCP 90, RFC 3864, 5344 September 2004. 5346 Appendix A. Notes on Processing XML Elements 5348 A.1. Notes on Empty XML Elements 5350 XML supports two mechanisms for indicating that an XML element does 5351 not have any content. The first is to declare an XML element of the 5352 form . The second is to declare an XML element of the form 5353 . The two XML elements are semantically identical. 5355 A.2. Notes on Illegal XML Processing 5357 XML is a flexible data format that makes it easy to submit data that 5358 appears legal but in fact is not. The philosophy of "Be flexible in 5359 what you accept and strict in what you send" still applies, but it 5360 must not be applied inappropriately. XML is extremely flexible in 5361 dealing with issues of white space, element ordering, inserting new 5362 elements, etc. This flexibility does not require extension, 5363 especially not in the area of the meaning of elements. 5365 There is no kindness in accepting illegal combinations of XML 5366 elements. At best it will cause an unwanted result and at worst it 5367 can cause real damage. 5369 A.3. Example - XML Syntax Error 5371 The following request body for a PROPFIND method is illegal. 5373 5374 5375 5376 5377 5379 The definition of the propfind element only allows for the allprop or 5380 the propname element, not both. Thus the above is an error and must 5381 be responded to with a 400 (Bad Request). 5383 Imagine, however, that a server wanted to be "kind" and decided to 5384 pick the allprop element as the true element and respond to it. A 5385 client running over a bandwidth limited line who intended to execute 5386 a propname would be in for a big surprise if the server treated the 5387 command as an allprop. 5389 Additionally, if a server were lenient and decided to reply to this 5390 request, the results would vary randomly from server to server, with 5391 some servers executing the allprop directive, and others executing 5392 the propname directive. This reduces interoperability rather than 5393 increasing it. 5395 A.4. Example - Unexpected XML Element 5397 The previous example was illegal because it contained two elements 5398 that were explicitly banned from appearing together in the propfind 5399 element. However, XML is an extensible language, so one can imagine 5400 new elements being defined for use with propfind. Below is the 5401 request body of a PROPFIND and, like the previous example, must be 5402 rejected with a 400 (Bad Request) by a server that does not 5403 understand the expired-props element. 5405 5406 5408 5409 5411 To understand why a 400 (Bad Request) is returned let us look at the 5412 request body as the server unfamiliar with expired-props sees it. 5414 5415 5417 5419 As the server does not understand the 'expired-props' element, 5420 according to the WebDAV-specific XML processing rules specified in 5421 Section 17, it must process the request as if the element were not 5422 there. Thus the server sees an empty propfind, which by the 5423 definition of the propfind element is illegal. 5425 Please note that had the extension been additive it would not 5426 necessarily have resulted in a 400 (Bad Request). For example, 5427 imagine the following request body for a PROPFIND: 5429 5430 5432 5433 *boss* 5434 5436 The previous example contains the fictitious element leave-out. Its 5437 purpose is to prevent the return of any property whose name matches 5438 the submitted pattern. If the previous example were submitted to a 5439 server unfamiliar with 'leave-out', the only result would be that the 5440 'leave-out' element would be ignored and a propname would be 5441 executed. 5443 Appendix B. Notes on HTTP Client Compatibility 5445 WebDAV was designed to be, and has been found to be, backward- 5446 compatible with HTTP 1.1. The PUT and DELETE methods are defined in 5447 HTTP and thus may be used by HTTP clients as well as WebDAV-aware 5448 clients, but the responses to PUT and DELETE have been extended in 5449 this specification in ways that only a WebDAV client would be 5450 entirely prepared for. Some theoretical concerns were raised about 5451 whether those responses would cause interoperability problems with 5452 HTTP-only clients, and this section addresses those concerns. 5454 Since any HTTP client ought to handle unrecognized 400-level and 500- 5455 level status codes as errors, the following new status codes should 5456 not present any issues: 422, 423 and 507 (424 is also a new status 5457 code but it appears only in the body of a Multistatus response.) So, 5458 for example, if a HTTP client attempted to PUT or DELETE a locked 5459 resource, the 423 Locked response ought to result in a generic error 5460 presented to the user. 5462 The 207 Multistatus response is interesting because a HTTP client 5463 issuing a DELETE request to a collection might interpret a 207 5464 response as a success, even though it does not realize the resource 5465 is a collection and cannot understand that the DELETE operation might 5466 have been a complete or partial failure. That interpretation isn't 5467 entirely justified, because a 200-level response indicates that the 5468 server "received, understood and accepted" the request, not that the 5469 request resulted in complete success. 5471 One option is that a server could treat a DELETE of a collection as 5472 an atomic operation, and use either 204 No Content in case of 5473 success, or some appropriate error response (400 or 500 level) for an 5474 error. This approach would indeed maximize backward compatibility. 5475 However, since interoperability tests and working group discussions 5476 have not turned up any instances of HTTP clients issuing a DELETE 5477 request against a WebDAV collection, this concern is more theoretical 5478 than practical. Thus, servers are likely to be completely successful 5479 at interoperating with HTTP clients even if they treat any collection 5480 DELETE request as a WebDAV request and send a 207 Multistatus 5481 response. 5483 In general server implementations are encouraged to use the detailed 5484 responses and other mechanisms defined in this document rather than 5485 make changes for theoretical interoperability concerns. 5487 Appendix C. The opaquelocktoken scheme and URIs 5489 The 'opaquelocktoken' URI scheme was defined in [RFC2518] (and 5490 registered by IANA) in order to create syntactically correct and 5491 easy-to-generate URIs out of UUIDs, intended to be used as lock 5492 tokens and to be unique across all resources for all time. 5494 An opaquelocktoken URI is constructed by concatenating the 5495 'opaquelocktoken' scheme with a UUID, along with an optional 5496 extension. Servers can create new UUIDs for each new lock token. If 5497 a server wishes to reuse UUIDs the server MUST add an extension and 5498 the algorithm generating the extension MUST guarantee that the same 5499 extension will never be used twice with the associated UUID. 5501 OpaqueLockToken-URI = "opaquelocktoken:" UUID [Extension] 5502 ; UUID is defined in Section 3 of [RFC4122]. Note that linear 5503 ; white space (LWS) is not allowed between elements of 5504 ; this production. 5506 Extension = path 5507 ; path is defined in Section 3.3 of [RFC3986] 5509 Appendix D. Lock-null Resources 5511 The original WebDAV model for locking unmapped URLs created "lock- 5512 null resources". This model was over-complicated and some 5513 interoperability and implementation problems were discovered. The 5514 new WebDAV model for locking unmapped URLs (see Section 7.3) creates 5515 "locked empty resources". Lock-null resources are deprecated. This 5516 section discusses the original model briefly because clients MUST be 5517 able to handle either model. 5519 In the original "lock-null resource" model, which is no longer 5520 recommended for implementation: 5522 o A lock-null resource sometimes appeared as "Not Found". The 5523 server responds with a 404 or 405 to any method except for PUT, 5524 MKCOL, OPTIONS, PROPFIND, LOCK, UNLOCK. 5526 o A lock-null resource does however show up as a member of its 5527 parent collection. 5529 o The server removes the lock-null resource entirely (its URI 5530 becomes unmapped) if its lock goes away before it is converted to 5531 a regular resource. Recall that locks go away not only when they 5532 expire or are unlcoked, but are also removed if a resource is 5533 renamed or moved, or if any parent collection is renamed or moved. 5535 o The server converts the lock-null resource into a regular resource 5536 if a PUT request to the URL is successful. 5538 o The server converts the lock-null resource into a collection if a 5539 MKCOL request to the URL is successful (though interoperability 5540 experience showed that not all servers followed this requirement). 5542 o Property values were defined for DAV:lockdiscovery and DAV: 5543 supportedlock properties but not necessarily for other properties 5544 like DAV:getcontenttype. 5546 Clients can easily interoperate both with servers that support the 5547 old model "lock-null resources" and the recommended model of "locked 5548 empty resources" by only attempting PUT after a LOCK to an unmapped 5549 URL, not MKCOL or GET. 5551 Appendix E. Guidance for Clients Desiring to Authenticate 5553 Many WebDAV clients already implemented have account settings 5554 (similar to the way email clients store IMAP account settings). 5555 Thus, the WebDAV client would be able to authenticate with its first 5556 couple requests to the server, provided it had a way to get the 5557 authentication challenge from the server with realm name, nonce and 5558 other challenge information. Note that the results of some requests 5559 might vary according to whether the client is authenticated or not -- 5560 a PROPFIND might return more visible resources if the client is 5561 authenticated, yet not fail if the client is anonymous. 5563 There are a number of ways the client might be able to trigger the 5564 server do provide an authentication challenge. This appendix 5565 describes a couple approaches that seem particularly likely to work. 5567 The first approach is to perform a request that ought to require 5568 authentication. However, it's possible that a server might handle 5569 any request even without authentication, so to be entirely safe the 5570 client could add a conditional header to ensure that even if the 5571 request passes permissions checks it's not actually handled by the 5572 server. An example of following this approach would be to use a PUT 5573 request with an "If-Match" header with a made-up ETag value. This 5574 approach might fail to result in an authentication challenge if the 5575 server does not test authorization before testing conditionals as is 5576 required (see Section 8.5), or if the server does not need to test 5577 authorization. 5579 Example - forcing auth challenge with write request 5581 >>Request 5583 PUT /forceauth.txt HTTP/1.1 5584 Host: www.example.com 5585 If-Match: "xxx" 5586 Content-Type: text/plain 5587 Content-Length: 0 5589 The second approach is to use an Authorization header (defined in 5590 [RFC2617]) which is likely to be rejected by the server but which 5591 will then prompt a proper authentication challenge. For example, the 5592 client could start with a PROPFIND request containing an 5593 Authorization header containing a made-up Basic userid:password 5594 string or with actual plausible credentials. This approach relies on 5595 the server responding with a "401 Unauthorized" along with a 5596 challenge if it receives an Authorization header with an unrecognized 5597 username, invalid password, or if it doesn't even handle Basic 5598 authentication. This seems likely to work because of the 5599 requirements of RFC2617: 5601 "If the origin server does not wish to accept the credentials sent 5602 with a request, it SHOULD return a 401 (Unauthorized) response. The 5603 response MUST include a WWW-Authenticate header field containing at 5604 least one (possibly new) challenge applicable to the requested 5605 resource." 5607 There's a slight problem with implementing that recommendation in 5608 some cases, because some servers do not even have challenge 5609 information for certain resources. Thus, when there's no way to 5610 authenticate to a resource or the resource is entirely publicly 5611 available over all accepted methods, the server MAY ignore the 5612 Authorization header, and the client presumably try again later. 5614 Example - forcing auth challenge with Authorization header 5616 >>Request 5618 PROPFIND /docs/ HTTP/1.1 5619 Host: www.example.com 5620 Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ== 5621 Content-type: application/xml; charset="utf-8" 5622 Content-Length: xxxx 5624 [body omitted] 5626 Appendix F. Summary of changes from RFC2518 5628 This section lists major changes between this document and RFC2518, 5629 starting with those that are likely to result in implementation 5630 changes. Servers will advertise support for all changes in this 5631 specification by returning the compliance class "3" in the DAV 5632 response header (see Sections 10.1 and 18.3). 5634 F.1. Changes for both Client and Server Implementations 5636 Collections and Namespace Operations 5638 o The semantics of PROPFIND 'allprop' (Section 9.1) have been 5639 relaxed so that servers may leave out live properties defined in 5640 other specifications, such as [RFC3253] and [RFC3744]. Related to 5641 this, 'allprop' requests can now be extended with the 'include' 5642 syntax to include specific named properties, thereby avoiding 5643 additional requests due to changed 'allprop' semantics. 5645 o Servers are now allowed to reject PROPFIND requests with Depth: 5646 Infinity. Clients that used this will need to be able to do a 5647 series of Depth:1 requests instead. 5649 o Multistatus response bodies now can transport the value of HTTP's 5650 Location response header in the new 'location' element. Clients 5651 may use this to avoid additional roundtrips to the server when 5652 there is a 'response' element with a 3xx status (see 5653 Section 14.24). 5655 o The definition of COPY has been relaxed so that it doesn't require 5656 servers to first delete the target resources anymore (this was a 5657 known incompatibility with [RFC3253]). See Section 9.8. 5659 Headers and Marshalling 5661 o The Destination and If request headers now allow absolute paths in 5662 addition to full URIs (see Section 8.3). This may be useful for 5663 clients operating through a reverse proxy that does rewrite the 5664 Host request header, but not WebDAV-specific headers. 5666 o This specification adopts the error marshalling extensions and the 5667 "precondition/postcondition" terminology defined in [RFC3253] (see 5668 Section 16). Related to that, it adds the "error" XML element 5669 inside multistatus response bodies (see Section 14.5, however note 5670 that it uses a format different from the one recommend in 5671 RFC3253). 5673 o Senders and recipients are now required to support the UTF-16 5674 character encoding in XML message bodies (see Section 19). 5676 o Clients are now required to send the Depth header on PROPFIND 5677 requests, although servers are still encouraged to support clients 5678 that don't. 5680 Locking 5682 o RFC2518's concept of "lock-null resources" (LNRs) has been 5683 replaced by a simplified approach, the "locked empty resources" 5684 (see Section 7.3). There are some aspects of lock-null resources 5685 clients can not rely on anymore, namely the ability to use them to 5686 create a locked collection or the fact that they disappear upon 5687 UNLOCK when no PUT or MKCOL request was issued. Note that servers 5688 are still allowed to implement LNRs as per RFC2518. 5690 o There is no implicit refresh of locks anymore. Locks are only 5691 refreshed upon explicit request (see Section 9.10.2). 5693 o Clarified that the DAV:owner value supplied in the LOCK request 5694 must be preserved by the server just like a dead property 5695 (Section 14.17). Also added the DAV:lockroot element 5696 (Section 14.12) which allows clients to discover the root of lock. 5698 F.2. Changes for Server Implementations 5700 Collections and Namespace Operations 5702 o Due to interoperability problems, allowable formats for contents 5703 of 'href' elements in multistatus responses have been limited (see 5704 Section 8.3). 5706 o Due to lack of implementation, support for the 'propertybehaviour' 5707 request body for COPY and MOVE has been removed. Instead, 5708 requirements for property preservation have been clarified (see 5709 Sections 9.8 and 9.9). 5711 Properties 5713 o Strengthened server requirements for storage of property values, 5714 in particular persistence of language information (xml:lang), 5715 whitespace, and XML namespace information (see Section 4.3). 5717 o Clarified requirements on which properties should be writeable by 5718 the client; in particular, setting "DAV:displayname" should be 5719 supported by servers (see Section 15). 5721 o Only 'rfc1123-date' productions are legal as values for DAV: 5722 getlastmodified (see Section 15.7). 5724 Headers and Marshalling 5726 o Servers are now required to do authorization checks before 5727 processing conditional headers (see Section 8.5). 5729 Locking 5731 o Strengthened requirement to check identity of lock creator when 5732 accessing locked resources (see Section 6.4). Clients should be 5733 aware that lock tokens returned to other principals can only be 5734 used to break a lock, if at all. 5736 o Section 8.10.4 of [RFC2518] incorrectly required servers to return 5737 a 409 status where a 207 status was really appropriate. This has 5738 been corrected (Section 9.10). 5740 F.3. Other Changes 5742 The definition of collection state has been fixed so it doesn't vary 5743 anymore depending on the Request-URI (see Section 5.2). 5745 The DAV:source property introduced in Section 4.6 of [RFC2518] was 5746 removed due to lack of implementation experience. 5748 The DAV header now allows non-IETF extensions through URIs in 5749 addition to compliance class tokens. It also can now be used in 5750 requests, although this specification does not define any associated 5751 semantics for the compliance classes defined in here (see 5752 Section 10.1). 5754 In RFC2518, the definition of the Depth header (Section 9.2) required 5755 that by default request headers would be applied to each resource in 5756 scope. Based on implementation experience, the default has now been 5757 reversed (see Section 10.2). 5759 The definitions of HTTP status code 102 ([RFC2518], Section 10.1) and 5760 the Status-URI response header (Section 9.7) have been removed due to 5761 lack of implementation. 5763 The TimeType format used in the Timeout request header and the 5764 "timeout" XML element used to be extensible. Now, only the two 5765 formats defined by this specification are allowed (see Section 10.7). 5767 Appendix G. Change Log (to be removed by RFC Editor before publication) 5769 G.1. Changes from -05 to -06 5771 Specified that a successful LOCK request to an unmapped URL creates a 5772 new, empty locked resource. 5774 Resolved UNLOCK_NEEDS_IF_HEADER by clarifying that only Lock-Token 5775 header is needed on UNLOCK. 5777 Added Section 16 on preconditions and postconditions and defined a 5778 number of preconditions and postconditions. The 'lock-token- 5779 submitted' precondition resolves the REPORT_OTHER_RESOURCE_LOCKED 5780 issue. 5782 Added example of matching lock token to URI in the case of a 5783 collection lock in the If header section. 5785 Removed ability for Destination header to take "abs_path" in order to 5786 keep consistent with other places where client provides URLs (If 5787 header, href element in request body) 5789 Clarified the href element - that it generally contains HTTP URIs but 5790 not always. 5792 Attempted to fix the BNF describing the If header to allow commas 5794 Clarified presence of Depth header on LOCK refresh requests. 5796 G.2. Changes in -07 5798 Added text to "COPY and the Overwrite Header" section to resolve 5799 issue OVERWRITE_DELETE_ALL_TOO_STRONG. 5801 Added text to "HTTP URL Namespace Model" section to provide more 5802 clarification and examples on what consistency means and what is not 5803 required, to resolve issue CONSISTENCY. 5805 Resolve DEFINE_PRINCIPAL by importing definition of principal from 5806 RFC3744. 5808 Resolve INTEROP_DELETE_AND_MULTISTATUS by adding appendix 3 5809 discussing backward-compatibility concerns. 5811 Resolve DATE_FORMAT_GETLASTMODIFIED by allowing only rfc1123-date, 5812 not HTTP-date for getlastmodified. 5814 Resolve COPY_INTO_YOURSELF_CLARIFY by adding sentence to first para. 5816 of COPY section. 5818 Confirm that WHEN_TO_MULTISTATUS_FOR_DELETE_1 and 5819 WHEN_TO_MULTISTATUS_FOR_DELETE_2 are resolved and tweak language in 5820 DELETE section slightly to be clearly consistent. 5822 More text clarifications to deal with several of the issues in 5823 LOCK_ISSUES. This may not completely resolve that set but we need 5824 feedback from the originator of the issues at this point. 5826 Resolved COPY_INTO_YOURSELF_CLARIFY with new sentence in Copy For 5827 Collections section. 5829 Double checked that LEVEL_OR_CLASS is resolved by using class, not 5830 level. 5832 Further work to resolve IF_AND_AUTH and LOCK_SEMANTICS, clarifying 5833 text on using locks and being authenticated. 5835 Added notes on use of 503 status response to resolve issue 5836 PROPFIND_INFINITY 5838 Removed section on other uses of Metadata (and associated references) 5840 Added reference to RFC4122 for lock tokens and removed section on 5841 generating UUIDs 5843 Explained that even with language variation, a property has only one 5844 value (Section 4.5). 5846 Added section on lock owner (7.1) and what to do if lock requested by 5847 unauthenticated user 5849 Removed Section 4.2 -- justification on why to have metadata, not 5850 needed now 5852 Removed paragraph in Section 5.2 about collections with resource type 5853 "DAV:collection" but which are non-WebDAV compliant -- not 5854 implemented. 5856 G.3. Changes in -08 5858 Added security considerations section on scripts and cookie sessions, 5859 suggested by Barry Lind 5861 Clarified which error codes are defined and undefined in MultiStatus 5863 Moved opaquelocktoken definition to an appendix and refer to RFC4122 5864 for use of 'urn:uuid:' URI scheme; fix all lock token examples to use 5865 this. 5867 Multi-status responses contain URLs which MUST either be absolute 5868 (and begin with the Request-URI or MUST be relative with new 5869 limitations. (bug 12) 5871 Moved status code sections before example sections within PROPFIND 5872 section for section ordering consistency. 5874 Clarified use of Location header with Multi-Status 5876 Bugzilla issue resolutions: bugs 9, 12, 14, 19, 20, 29, 30, 34, 36, 5877 102 and 172. 5879 G.4. Changes in -09 5881 Bugzilla editorial issues: bugs 30, 57, 63, 68, 88, 89, 168, 180, 5882 182, 185, 187. 5884 More clarity between URL namespaces and XML namespaces, particularly 5885 at the beginning of paragraphs using the word namespace 5887 More consistency in referring to properties with the namespace, as in 5888 "DAV:lockdiscovery", and referring to XML element names in single 5889 quotes, e.g. 'allprop' element. 5891 Figure (example) formatting fixes 5893 Bugzilla issues: bugs 24, 37, 39, 43, 45, 27, 25 5895 Replaced references to "non-null state" of resources with more clear 5896 language about URLs that are mapped to resources, bug 25. Also added 5897 definition of URL/URI mapping. Bug 40. 5899 Bugzilla issues: bug 7, 8, 9, 41, 47, 51, 62, 93, 171, 172. Bugs 28 5900 and 94 were iterated on. 5902 Bugzilla issues: 56, 59, 79, 99, 103, 175, 178. Part of bug 23. 5903 Iteration on bug 10. 5905 Iteration on bugs 10, 46 and 47. Bug 11. 5907 Remove "102 Processing" response 5909 Fix bug 46, 105, 107, 120, 140 and 201. 5911 Another stab at bug 12 - relative v. absolute URLs in Multi-Status 5912 response hrefs 5914 Fix bug 6, 11, 15, 16, 28, 32, 42, 51, 52, 53, 58, 60, 62, 186, 189, 5915 191, 199, 200 5917 Fix bug 96 5919 G.5. Changes in -10 5921 Clarify lock intro text on when a client might use another client's 5922 lock token - suggestion by Geoff, Nov 15 5924 Removed Force-Authenticate header and instead added an appendix 5925 explaining how existing mechanisms might resolve the need of clients 5926 to get an authentication challenge (bug 18). 5928 Bug 62, 113, 125, 131, 143, 144, 171, 193 5930 Bug 176, 177, 179, 181, 184, 206, 207, 208 5932 G.6. Changes in -11 5934 Bug 10, 50, 92, 213, 214, 215 5936 not recommend use of 414 for over-long Destination URI, bug 179 5938 Changes for bug 10, 31, 42, 44, 46, 47, 80, 86, 99, 124, 132, 143, 5939 147, 152, 166, 177, 188, 216, 218 5941 Various changes discussed in conference call, including bug 10, 42, 5942 44, 80, 97, 152. 5944 Bugs 55, 85, 86 5946 G.7. Changes in -12 5948 Incorporated GULP (Lock model) into document, making a fair number of 5949 changes to rationalize the new order of explaining things, keeping 5950 text that explains a lock model concept in more detail but removing 5951 text that is redundant or inconsistent. 5953 Various bugs including 46, 48, 53, 97, 152, 179, 184, 188, 200, 210, 5954 211, and 225. Moved URL Handling from Multi-Status section to 5955 general request and response handling section as it now applies to 5956 Destination and If as well as 'href' in Multi-Status. Moved GR&RH 5957 section up one level to be the new Section 8. 5959 Bug 53, 184, 210, 213, 217, 221 5960 Further rewriting of URL Handling section. Changes resulting from 5961 discussion of empty locked resources and how servers should handle 5962 Content-Type in that situation. Bug 48, 179. 5964 Bug 227, 228 5966 G.8. Changes in -13 5968 Moved the timeout model text and clarified it (bug 229). 5970 Fixed the definition of collection state (bug 227). 5972 Made the depth header required on PROPFIND requests (bug 213). 5974 Fixed inconsistencies in Destination header definition (bug 211). 5976 Improved appendix on HTTP client compatibility (bug 100). 5978 Fixed external references with unwieldy pointers (bug 72). 5980 G.9. Changes in -14 5982 Changes section rewritten, if section rewritten 5984 Collection definition and membership requirements changed (bug 227) 5986 Bug 100 and 229 iterations, smallish editorial changes 5988 G.10. Changes in -15 5990 Moved lock-null resource explanation to an appendix. 5992 Reverted to RFC2518 behavior of refreshing lock with "If" header. 5994 Removed section on locks and multiple bindings. 5996 Removed requirement for clients to upate a property only once in a 5997 PROPPATCH. 5999 Updated displayname property description. 6001 Copy-edit level changes e.g. "read-only" to "protected", and defining 6002 what it means to protect a resource with a lock. 6004 G.11. Changes in -16 6006 Fixed factual errors in Security Considerations authentication 6007 section. 6009 Fixed example of refreshing a lock -- didn't use "If" header as 6010 required in the text. 6012 Fixed example of using so-called 'all-prop' with the 'include' 6013 directive, so that it would actually be a useful example, by 6014 including live properties that wouldn't already be covered by 'all- 6015 prop'. 6017 Clarified requirement in section 7.7 paragraph 2 -- a clear 6018 requirement for the server to meet, rather than passive voice "this 6019 request MUST only be used". 6021 Made explicit requirement for successful response format for 6022 PROPPATCH (bug 238) 6024 Some fixes for bugs 213, 241, 246, 248, 249, 250 -- all editorial 6025 changes. 6027 Tighten requirements in Security Considerations section for 6028 authentication over secure channels. 6030 Author's Address 6032 Lisa Dusseault (editor) 6033 CommerceNet 6034 2064 Edgewood Dr. 6035 Palo Alto, CA 94303 6036 US 6038 Email: ldusseault@commerce.net 6040 Full Copyright Statement 6042 Copyright (C) The Internet Society (2006). 6044 This document is subject to the rights, licenses and restrictions 6045 contained in BCP 78, and except as set forth therein, the authors 6046 retain all their rights. 6048 This document and the information contained herein are provided on an 6049 "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS 6050 OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET 6051 ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, 6052 INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE 6053 INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED 6054 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 6056 Intellectual Property 6058 The IETF takes no position regarding the validity or scope of any 6059 Intellectual Property Rights or other rights that might be claimed to 6060 pertain to the implementation or use of the technology described in 6061 this document or the extent to which any license under such rights 6062 might or might not be available; nor does it represent that it has 6063 made any independent effort to identify any such rights. Information 6064 on the procedures with respect to rights in RFC documents can be 6065 found in BCP 78 and BCP 79. 6067 Copies of IPR disclosures made to the IETF Secretariat and any 6068 assurances of licenses to be made available, or the result of an 6069 attempt made to obtain a general license or permission for the use of 6070 such proprietary rights by implementers or users of this 6071 specification can be obtained from the IETF on-line IPR repository at 6072 http://www.ietf.org/ipr. 6074 The IETF invites any interested party to bring to its attention any 6075 copyrights, patents or patent applications, or other proprietary 6076 rights that may cover technology that may be required to implement 6077 this standard. Please address the information to the IETF at 6078 ietf-ipr@ietf.org. 6080 Acknowledgment 6082 Funding for the RFC Editor function is provided by the IETF 6083 Administrative Support Activity (IASA).