├── src ├── Method │ ├── Rfc │ │ ├── Status │ │ │ ├── Experimental.php │ │ │ └── ProposedStandard.php │ │ ├── Rfc5323.php │ │ ├── Rfc2068.php │ │ ├── Rfc3744.php │ │ ├── Rfc7540.php │ │ ├── Rfc4791.php │ │ ├── Rfc3648.php │ │ ├── Rfc4437.php │ │ ├── Rfc5789.php │ │ ├── Rfc5842.php │ │ ├── Rfc4918.php │ │ ├── Rfc7231.php │ │ └── Rfc3253.php │ ├── WebDav.php │ └── Vendor │ │ ├── SquidCache.php │ │ └── VarnishCache.php └── Method.php ├── LICENSE.md ├── composer.json ├── CHANGELOG.md └── README.md /src/Method/Rfc/Status/Experimental.php: -------------------------------------------------------------------------------- 1 | 62 | * 63 | * If a response body for a successful request is included, it MUST 64 | * be a CALDAV:mkcalendar-response XML element. 65 | * 66 | * 67 | * 68 | * The response MUST include a Cache-Control:no-cache header. 69 | * 70 | * Preconditions: 71 | * 72 | * (DAV:resource-must-be-null): A resource MUST NOT exist at the 73 | * Request-URI; 74 | * 75 | * (CALDAV:calendar-collection-location-ok): The Request-URI MUST 76 | * identify a location where a calendar collection can be created; 77 | * 78 | * (CALDAV:valid-calendar-data): The time zone specified in the 79 | * CALDAV:calendar-timezone property MUST be a valid iCalendar object 80 | * containing a single valid VTIMEZONE component; 81 | * 82 | * (DAV:needs-privilege): The DAV:bind privilege MUST be granted to 83 | * the current user on the parent collection of the Request-URI. 84 | * 85 | * Postconditions: 86 | * 87 | * (CALDAV:initialize-calendar-collection): A new calendar collection 88 | * exists at the Request-URI. The DAV:resourcetype of the calendar 89 | * collection MUST contain both DAV:collection and CALDAV:calendar 90 | * XML elements. 91 | * 92 | * Daboo, C., et al. 93 | * 94 | * Safe: no 95 | * Idempotent: yes 96 | * 97 | * @see https://tools.ietf.org/html/rfc4791#section-5.3.1 98 | */ 99 | public const MKCALENDAR = 'MKCALENDAR'; 100 | } 101 | -------------------------------------------------------------------------------- /src/Method/Rfc/Rfc3648.php: -------------------------------------------------------------------------------- 1 | 57 | * 58 | * 59 | * 60 | * 61 | * 62 | * 63 | * 64 | * 65 | * 66 | * PCDATA value: segment, as defined in section 3.3 of [RFC2396]. 67 | * 68 | * The DAV:ordering-type property is modified according to the 69 | * DAV:ordering-type element. 70 | * 71 | * The ordering of internal member URIs in the collection identified 72 | * by the Request-URI is changed based on instructions in the order- 73 | * member XML elements. Specifically, in the order that they appear 74 | * in the request. The order-member XML elements identify the 75 | * internal member URIs whose positions are to be changed, and 76 | * describe their new positions in the ordering. Each new position 77 | * can be specified as first in the ordering, last in the ordering, 78 | * immediately before some other internal member URI, or immediately 79 | * after some other internal member URI. 80 | * 81 | * If a response body for a successful request is included, it MUST 82 | * be a DAV:orderpatch-response XML element. Note that this document 83 | * does not define any elements for the ORDERPATCH response body, but 84 | * the DAV:orderpatch-response element is defined to ensure 85 | * interoperability between future extensions that do define elements 86 | * for the ORDERPATCH response body. 87 | * 88 | * 89 | * 90 | * Since multiple changes can be requested in a single ORDERPATCH 91 | * request, the server MUST return a 207 (Multi-Status) response 92 | * (defined in [RFC2518]), containing DAV:response elements for 93 | * either the request-URI (when the DAV:ordering-type could not be 94 | * modified) or URIs of collection members to be repositioned (when 95 | * an individual positioning request expressed as DAV:order-member 96 | * could not be fulfilled) if any problems are encountered. 97 | * 98 | * Preconditions: 99 | * 100 | * (DAV:collection-must-be-ordered): see Section 6.1. 101 | * 102 | * (DAV:segment-must-identify-member): see Section 6.1. 103 | * 104 | * Postconditions: 105 | * 106 | * (DAV:ordering-type-set): if the request body contained a 107 | * DAV:ordering-type element, the request MUST have set the 108 | * DAV:ordering-type property of the collection to the value 109 | * specified in the request. 110 | * 111 | * (DAV:ordering-modified): if the request body contained DAV:order- 112 | * member elements, the request MUST have set the ordering of 113 | * internal member URIs in the collection identified by the request- 114 | * URI based upon the instructions in the DAV:order-member elements. 115 | * 116 | * Whitehead, J., & Reschke, J. 117 | * 118 | * Safe: no 119 | * Idempotent: yes. 120 | * 121 | * @see https://tools.ietf.org/html/rfc3648#section-7 122 | */ 123 | public const ORDERPATCH = 'ORDERPATCH'; 124 | } 125 | -------------------------------------------------------------------------------- /src/Method/Rfc/Rfc4437.php: -------------------------------------------------------------------------------- 1 | 37 | * 38 | * 39 | * 40 | * 41 | * 42 | * The DAV:href element is defined in [RFC2518] (Section 12.3) and 43 | * MUST contain either a URI or a relative-ref (see [RFC3986], 44 | * Sections 3 and 4.2). 45 | * 46 | * If no DAV:redirect-lifetime element is specified, the server MUST 47 | * behave as if a value of DAV:temporary was specified. 48 | * 49 | * If the request succeeds, the server MUST return 201 (Created) 50 | * status. 51 | * 52 | * If a response body for a successful request is included, it MUST 53 | * be a DAV:mkredirectref-response XML element. Note that this 54 | * document does not define any elements for the MKREDIRECTREF 55 | * response body, but the DAV:mkredirectref-response element is 56 | * defined to ensure interoperability between future extensions that 57 | * do define elements for the response body. 58 | * 59 | * 60 | * 61 | * Preconditions 62 | * 63 | * (DAV:resource-must-be-null): A resource MUST NOT exist at the 64 | * Request-URI. 65 | * 66 | * (DAV:parent-resource-must-be-non-null): The Request-URI minus the 67 | * last past segment MUST identify a collection. 68 | * 69 | * (DAV:name-allowed): The last segment of the Request-URI is 70 | * available for use as a resource name. 71 | * 72 | * (DAV:locked-update-allowed): If the collection identified by the 73 | * Request-URI minus the last path segment is write-locked, then the 74 | * appropriate token MUST be specified in an If request header. 75 | * 76 | * (DAV:redirect-lifetime-supported): If the request body contains a 77 | * DAV:redirect-lifetime element, the server MUST support the 78 | * specified lifetime. Support for DAV:temporary is REQUIRED, while 79 | * support for DAV:permanent is OPTIONAL. 80 | * 81 | * (DAV:legal-reftarget): The specified is a legal URI or relative- 82 | * ref. 83 | * 84 | * Postconditions 85 | * 86 | * (DAV:new-redirectref): a new redirect reference resource is 87 | * created whose DAV:reftarget property has the value specified in 88 | * the request body. 89 | * 90 | * Whitehead, J., et al. 91 | * 92 | * Safe: no 93 | * Idempotent: yes 94 | * 95 | * @see https://tools.ietf.org/html/rfc4437#section-6 96 | */ 97 | public const MKREDIRECTREF = 'MKREDIRECTREF'; 98 | 99 | /** 100 | * The UPDATEREDIRECTREF method requests the update of a redirect 101 | * reference resource. 102 | * 103 | * If a UPDATEREDIRECTREF request fails, the server state preceding the 104 | * request MUST be restored. 105 | * 106 | * Responses from a UPDATEREDIRECTREF request MUST NOT be cached, as 107 | * UPDATEREDIRECTREF has non-safe semantics (see [RFC2616], Section 108 | * 9.1). 109 | * 110 | * Marshalling 111 | * 112 | * The request body MUST be a DAV:updateredirectref XML element. 113 | * 114 | * 115 | * 116 | * See Section 6 for a definition of DAV:reftarget and DAV:redirect- 117 | * lifetime. 118 | * 119 | * If no DAV:reftarget element is specified, the server MUST NOT 120 | * change the target of the redirect reference. 121 | * 122 | * If no DAV:redirect-lifetime element is specified, the server MUST 123 | * NOT change the lifetime of the redirect reference. 124 | * 125 | * If a response body for a successful request is included, it MUST 126 | * be a DAV:updateredirectref-response XML element. Note that this 127 | * document does not define any elements for the UPDATEREDIRECTREF 128 | * response body, but the DAV:updateredirectref-response element is 129 | * defined to ensure interoperability between future extensions that 130 | * do define elements for the response body. 131 | * 132 | * 133 | * 134 | * Preconditions 135 | * 136 | * (DAV:locked-update-allowed): if the resource is write-locked, then 137 | * the appropriate token MUST be specified in an If request header. 138 | * 139 | * (DAV:must-be-redirectref): the resource identified by the 140 | * Request-URI must be a redirect reference resource as defined by 141 | * this specification. 142 | * 143 | * (DAV:redirect-lifetime-supported): see Section 6. 144 | * 145 | * (DAV:redirect-lifetime-update-supported): servers MAY support 146 | * changing the DAV:redirect-lifetime property; if they don't, this 147 | * condition code can be used to signal failure. 148 | * 149 | * (DAV:legal-reftarget): see Section 6. 150 | * 151 | * Postconditions 152 | * 153 | * (DAV:redirectref-updated): the DAV:reftarget and DAV:redirect- 154 | * lifetime properties of the redirect reference have been updated 155 | * accordingly. 156 | * 157 | * Whitehead, J., et al. 158 | * 159 | * Safe: no 160 | * Idempotent: yes 161 | * 162 | * @see https://tools.ietf.org/html/rfc4437#section-7 163 | */ 164 | public const UPDATEREDIRECTREF = 'UPDATEREDIRECTREF'; 165 | } 166 | -------------------------------------------------------------------------------- /src/Method/Rfc/Rfc5789.php: -------------------------------------------------------------------------------- 1 | create( 136 | Method::GET, 137 | 'https://localheinz.com/articles/' 138 | ); 139 | 140 | /** @var Client\ClientInterface $httpClient */ 141 | $httpClient->sendRequest($request); 142 | ``` 143 | 144 | :bulb: If you are aware of any other - either standardized or vendor-specific - HTTP methods that are used in the wild, please let me know! 145 | 146 | ## Changelog 147 | 148 | The maintainers of this project record notable changes to this project in a [changelog](CHANGELOG.md). 149 | 150 | ## Contributing 151 | 152 | The maintainers of this project suggest following the [contribution guide](.github/CONTRIBUTING.md). 153 | 154 | ## Code of Conduct 155 | 156 | The maintainers of this project ask contributors to follow the [code of conduct](https://github.com/ergebnis/.github/blob/main/CODE_OF_CONDUCT.md). 157 | 158 | ## General Support Policy 159 | 160 | The maintainers of this project provide limited support. 161 | 162 | You can support the maintenance of this project by [sponsoring @ergebnis](https://github.com/sponsors/ergebnis). 163 | 164 | ## PHP Version Support Policy 165 | 166 | This project supports PHP versions with [active and security support](https://www.php.net/supported-versions.php). 167 | 168 | The maintainers of this project add support for a PHP version following its initial release and drop support for a PHP version when it has reached the end of security support. 169 | 170 | ## Security Policy 171 | 172 | This project has a [security policy](.github/SECURITY.md). 173 | 174 | ## License 175 | 176 | This project uses the [MIT license](LICENSE.md). 177 | 178 | ## Social 179 | 180 | Follow [@localheinz](https://twitter.com/intent/follow?screen_name=localheinz) and [@ergebnis](https://twitter.com/intent/follow?screen_name=ergebnis) on Twitter. 181 | -------------------------------------------------------------------------------- /src/Method/Rfc/Rfc5842.php: -------------------------------------------------------------------------------- 1 | 58 | * 59 | * If the request succeeds, the server MUST return 201 (Created) when 60 | * a new binding was created and 200 (OK) or 204 (No Content) when an 61 | * existing binding was replaced. 62 | * 63 | * If a response body for a successful request is included, it MUST 64 | * be a DAV:bind-response XML element. Note that this document does 65 | * not define any elements for the BIND response body, but the DAV: 66 | * bind-response element is defined to ensure interoperability 67 | * between future extensions that do define elements for the BIND 68 | * response body. 69 | * 70 | * 71 | * 72 | * Preconditions: 73 | * 74 | * (DAV:bind-into-collection): The Request-URI MUST identify a 75 | * collection. 76 | * 77 | * (DAV:bind-source-exists): The DAV:href element MUST identify a 78 | * resource. 79 | * 80 | * (DAV:binding-allowed): The resource identified by the DAV:href 81 | * supports multiple bindings to it. 82 | * 83 | * (DAV:cross-server-binding): If the resource identified by the DAV: 84 | * href element in the request body is on another server from the 85 | * collection identified by the Request-URI, the server MUST support 86 | * cross-server bindings (servers that do not support cross-server 87 | * bindings can use this condition code to signal the client exactly 88 | * why the request failed). 89 | * 90 | * (DAV:name-allowed): The name specified by the DAV:segment is 91 | * available for use as a new binding name. 92 | * 93 | * (DAV:can-overwrite): If the collection already contains a binding 94 | * with the specified path segment, and if an Overwrite header is 95 | * included, the value of the Overwrite header MUST be "T". 96 | * 97 | * (DAV:cycle-allowed): If the DAV:href element identifies a 98 | * collection, and if the Request-URI identifies a collection that is 99 | * a member of that collection, the server MUST support cycles in the 100 | * URI namespace (servers that do not support cycles can use this 101 | * condition code to signal the client exactly why the request 102 | * failed). 103 | * 104 | * (DAV:locked-update-allowed): If the collection identified by the 105 | * Request-URI is write-locked, then the appropriate token MUST be 106 | * specified in an If request header. 107 | * 108 | * (DAV:locked-overwrite-allowed): If the collection already contains 109 | * a binding with the specified path segment, and if that binding is 110 | * protected by a write lock, then the appropriate token MUST be 111 | * specified in an If request header. 112 | * 113 | * Postconditions: 114 | * 115 | * (DAV:new-binding): The collection MUST have a binding that maps 116 | * the segment specified in the DAV:segment element in the request 117 | * body to the resource identified by the DAV:href element in the 118 | * request body. 119 | * 120 | * Clemm, G., et al. 121 | * 122 | * Safe: no 123 | * Idempotent: yes 124 | * 125 | * @see https://tools.ietf.org/html/rfc5842#section-4 126 | */ 127 | public const BIND = 'BIND'; 128 | 129 | /** 130 | * The REBIND method removes a binding to a resource from a collection, 131 | * and adds a binding to that resource into the collection identified by 132 | * the Request-URI. The request body specifies the binding to be added 133 | * (segment) and the old binding to be removed (href). It is 134 | * effectively an atomic form of a MOVE request, and MUST be treated the 135 | * same way as MOVE for the purpose of determining access permissions. 136 | * 137 | * If a REBIND request fails, the server state preceding the request 138 | * MUST be restored. This method is unsafe and idempotent (see 139 | * [RFC2616], Section 9.1). 140 | * 141 | * Marshalling: 142 | * 143 | * The request MAY include an Overwrite header. 144 | * 145 | * The request body MUST be a DAV:rebind XML element. 146 | * 147 | * 148 | * 149 | * If the request succeeds, the server MUST return 201 (Created) when 150 | * a new binding was created and 200 (OK) or 204 (No Content) when an 151 | * existing binding was replaced. 152 | * 153 | * If a response body for a successful request is included, it MUST 154 | * be a DAV:rebind-response XML element. Note that this document 155 | * does not define any elements for the REBIND response body, but the 156 | * DAV:rebind-response element is defined to ensure interoperability 157 | * between future extensions that do define elements for the REBIND 158 | * response body. 159 | * 160 | * 161 | * 162 | * Preconditions: 163 | * 164 | * (DAV:rebind-into-collection): The Request-URI MUST identify a 165 | * collection. 166 | * 167 | * (DAV:rebind-source-exists): The DAV:href element MUST identify a 168 | * resource. 169 | * 170 | * (DAV:cross-server-binding): If the resource identified by the DAV: 171 | * href element in the request body is on another server from the 172 | * collection identified by the Request-URI, the server MUST support 173 | * cross-server bindings (servers that do not support cross-server 174 | * bindings can use this condition code to signal the client exactly 175 | * why the request failed). 176 | * 177 | * (DAV:name-allowed): The name specified by the DAV:segment is 178 | * available for use as a new binding name. 179 | * 180 | * (DAV:can-overwrite): If the collection already contains a binding 181 | * with the specified path segment, and if an Overwrite header is 182 | * included, the value of the Overwrite header MUST be "T". 183 | * 184 | * (DAV:cycle-allowed): If the DAV:href element identifies a 185 | * collection, and if the Request-URI identifies a collection that is 186 | * a member of that collection, the server MUST support cycles in the 187 | * URI namespace (servers that do not support cycles can use this 188 | * condition code to signal the client exactly why the request 189 | * failed). 190 | * 191 | * (DAV:locked-update-allowed): If the collection identified by the 192 | * Request-URI is write-locked, then the appropriate token MUST be 193 | * specified in the request. 194 | * 195 | * (DAV:protected-url-modification-allowed): If the collection 196 | * identified by the Request-URI already contains a binding with the 197 | * specified path segment, and if that binding is protected by a 198 | * write lock, then the appropriate token MUST be specified in the 199 | * request. 200 | * 201 | * (DAV:locked-source-collection-update-allowed): If the collection 202 | * identified by the parent collection prefix of the DAV:href URI is 203 | * write-locked, then the appropriate token MUST be specified in the 204 | * request. 205 | * 206 | * (DAV:protected-source-url-deletion-allowed): If the DAV:href URI 207 | * is protected by a write lock, then the appropriate token MUST be 208 | * specified in the request. 209 | * 210 | * Postconditions: 211 | * 212 | * (DAV:new-binding): The collection MUST have a binding that maps 213 | * the segment specified in the DAV:segment element in the request 214 | * body, to the resource that was identified by the DAV:href element 215 | * in the request body. 216 | * 217 | * (DAV:binding-deleted): The URL specified in the DAV:href element 218 | * in the request body MUST NOT be mapped to a resource. 219 | * 220 | * (DAV:lock-deleted): If the URL specified in the DAV:href element 221 | * in the request body was protected by a write lock at the time of 222 | * the request, that write lock must have been deleted by the 223 | * request. 224 | * 225 | * Clemm, G., et al. 226 | * 227 | * Safe: no 228 | * Idempotent: yes 229 | * 230 | * @see https://tools.ietf.org/html/rfc5842#section-6 231 | */ 232 | public const REBIND = 'REBIND'; 233 | 234 | /** 235 | * The UNBIND method modifies the collection identified by the Request- 236 | * URI by removing the binding identified by the segment specified in 237 | * the UNBIND body. 238 | * 239 | * Once a resource is unreachable by any URI mapping, the server MAY 240 | * reclaim system resources associated with that resource. If UNBIND 241 | * removes a binding to a resource, but there remain URI mappings to 242 | * that resource, the server MUST NOT reclaim system resources 243 | * associated with the resource. 244 | * 245 | * If an UNBIND request fails, the server state preceding the request 246 | * MUST be restored. This method is unsafe and idempotent (see 247 | * [RFC2616], Section 9.1). 248 | * 249 | * Marshalling: 250 | * 251 | * The request body MUST be a DAV:unbind XML element. 252 | * 253 | * 254 | * 255 | * If the request succeeds, the server MUST return 200 (OK) or 204 256 | * (No Content) when the binding was successfully deleted. 257 | * 258 | * If a response body for a successful request is included, it MUST 259 | * be a DAV:unbind-response XML element. Note that this document 260 | * does not define any elements for the UNBIND response body, but the 261 | * DAV:unbind-response element is defined to ensure interoperability 262 | * between future extensions that do define elements for the UNBIND 263 | * response body. 264 | * 265 | * 266 | * 267 | * Preconditions: 268 | * 269 | * (DAV:unbind-from-collection): The Request-URI MUST identify a 270 | * collection. 271 | * 272 | * (DAV:unbind-source-exists): The DAV:segment element MUST identify 273 | * a binding in the collection identified by the Request-URI. 274 | * 275 | * (DAV:locked-update-allowed): If the collection identified by the 276 | * Request-URI is write-locked, then the appropriate token MUST be 277 | * specified in the request. 278 | * 279 | * (DAV:protected-url-deletion-allowed): If the binding identified by 280 | * the segment is protected by a write lock, then the appropriate 281 | * token MUST be specified in the request. 282 | * 283 | * Postconditions: 284 | * 285 | * (DAV:binding-deleted): The collection MUST NOT have a binding for 286 | * the segment specified in the DAV:segment element in the request 287 | * body. 288 | * 289 | * (DAV:lock-deleted): If the internal member URI of the binding 290 | * specified by the Request-URI and the DAV:segment element in the 291 | * request body was protected by a write lock at the time of the 292 | * request, that write lock must have been deleted by the request. 293 | * 294 | * Clemm, G., et al. 295 | * 296 | * Safe: no 297 | * Idempotent: yes 298 | * 299 | * @see https://tools.ietf.org/html/rfc5842#section-5 300 | */ 301 | public const UNBIND = 'UNBIND'; 302 | } 303 | -------------------------------------------------------------------------------- /src/Method/Rfc/Rfc4918.php: -------------------------------------------------------------------------------- 1 | 46 | * ANY value: A sequence of elements with at most one DAV:baseline 47 | * element. 48 | * 49 | * 50 | * 51 | * If a response body for a successful request is included, it MUST 52 | * be a DAV:baseline-control-response XML element. 53 | * 54 | * 55 | * 56 | * The response MUST include a Cache-Control:no-cache header. 57 | * 58 | * Preconditions: 59 | * 60 | * (DAV:version-controlled-configuration-must-not-exist): The 61 | * DAV:version-controlled-configuration property of the collection 62 | * identified by the request-URL MUST not exist. 63 | * 64 | * (DAV:must-be-baseline): The DAV:href of the DAV:baseline element 65 | * in the request body MUST identify a baseline. 66 | * 67 | * (DAV:must-have-no-version-controlled-members): If a DAV:baseline 68 | * element is specified in the request body, the collection 69 | * identified by the request-URL MUST have no version-controlled 70 | * members. 71 | * 72 | * (DAV:one-baseline-controlled-collection-per-history-per- 73 | * workspace): If the request-URL identifies a workspace or a member 74 | * of a workspace, and if a baseline is specified in a DAV:baseline 75 | * element in the request body, then there MUST NOT be another 76 | * collection in that workspace whose DAV:version-controlled- 77 | * configuration property identifies a version-controlled 78 | * configuration for the baseline history of that baseline. 79 | * 80 | * Postconditions: 81 | * 82 | * (DAV:create-version-controlled-configuration): A new version- 83 | * controlled configuration is created, whose DAV:baseline- 84 | * controlled-collection property identifies the collection. 85 | * 86 | * (DAV:reference-version-controlled-configuration): The 87 | * DAV:version-controlled-configuration of the collection identifies 88 | * the new version-controlled configuration. 89 | * 90 | * (DAV:select-existing-baseline): If the request body specifies a 91 | * baseline, the DAV:checked-in property of the new version- 92 | * controlled configuration MUST have been set to identify this 93 | * baseline. A version-controlled member of the collection will be 94 | * created for each version in the baseline, where the version- 95 | * controlled member will have the content and dead properties of 96 | * that version, and will have the same name relative to the 97 | * collection as the corresponding version-controlled resource had 98 | * when the baseline was created. Any nested collections that are 99 | * needed to provide the appropriate name for a version-controlled 100 | * member will be created. 101 | * 102 | * (DAV:create-new-baseline): If no baseline is specified in the 103 | * request body, the request MUST have created a new baseline history 104 | * at a server-defined URL, and MUST have created a new baseline in 105 | * that baseline history. The DAV:baseline-collection of the new 106 | * baseline MUST identify a collection whose members have the same 107 | * relative name and DAV:checked-in version as the version-controlled 108 | * members of the request collection. The DAV:checked-in property of 109 | * the new version-controlled configuration MUST identify the new 110 | * baseline. 111 | * 112 | * Clemm, G., et al. 113 | * 114 | * Safe: no 115 | * Idempotent: yes 116 | * 117 | * @see https://tools.ietf.org/html/rfc3253#section-12.6 118 | */ 119 | public const BASELINE_CONTROL = 'BASELINE_CONTROL'; 120 | 121 | /** 122 | * A CHECKIN request can be applied to a checked-out version-controlled 123 | * resource to produce a new version whose content and dead properties 124 | * are copied from the checked-out resource. 125 | * 126 | * If a CHECKIN request fails, the server state preceding the request 127 | * MUST be restored. 128 | * 129 | * Marshalling: 130 | * 131 | * If a request body is included, it MUST be a DAV:checkin XML 132 | * element. 133 | * 134 | * 135 | * ANY value: A sequence of elements with at most one 136 | * DAV:keep-checked-out element and at most one DAV:fork-ok element. 137 | * 138 | * 139 | * 140 | * 141 | * If a response body for a successful request is included, it MUST 142 | * be a DAV:checkin-response XML element. 143 | * 144 | * 145 | * 146 | * The response MUST include a Cache-Control:no-cache header. 147 | * 148 | * Preconditions: 149 | * 150 | * (DAV:must-be-checked-out): The request-URL MUST identify a 151 | * resource with a DAV:checked-out property. 152 | * 153 | * (DAV:version-history-is-tree) The versions identified by the 154 | * DAV:predecessor-set of the checked-out resource MUST be 155 | * descendants of the root version of the version history for the 156 | * DAV:checked-out version. 157 | * 158 | * (DAV:checkin-fork-forbidden): A CHECKIN request MUST fail if it 159 | * would cause a version whose DAV:checkin-fork is DAV:forbidden to 160 | * appear in the DAV:predecessor-set of more than one version. 161 | * 162 | * (DAV:checkin-fork-discouraged): A CHECKIN request MUST fail if it 163 | * would cause a version whose DAV:checkin-fork is DAV:discouraged to 164 | * appear in the DAV:predecessor-set of more than one version, unless 165 | * DAV:fork-ok is specified in the request body. 166 | * 167 | * Postconditions: 168 | * 169 | * (DAV:create-version): The request MUST have created a new version 170 | * in the version history of the DAV:checked-out version. The 171 | * request MUST have allocated a distinct new URL for the new 172 | * version, and that URL MUST NOT ever identify any resource other 173 | * than that version. The URL for the new version MUST be returned in 174 | * a Location response header. 175 | * 176 | * (DAV:initialize-version-content-and-properties): The content, dead 177 | * properties, DAV:resourcetype, and DAV:predecessor-set of the new 178 | * version MUST be copied from the checked-out resource. The 179 | * DAV:version-name of the new version MUST be set to a server- 180 | * defined value distinct from all other DAV:version-name values of 181 | * other versions in the same version history. 182 | * 183 | * (DAV:checked-in): If the request-URL identifies a version- 184 | * controlled resource and DAV:keep-checked-out is not specified in 185 | * the request body, the DAV:checked-out property of the version- 186 | * controlled resource MUST have been removed and a DAV:checked-in 187 | * property that identifies the new version MUST have been added. 188 | * 189 | * (DAV:keep-checked-out): If DAV:keep-checked-out is specified in 190 | * the request body, the DAV:checked-out property of the checked-out 191 | * resource MUST have been updated to identify the new version. 192 | * 193 | * Clemm, G., et al. 194 | * 195 | * Safe: no 196 | * Idempotent: yes 197 | * 198 | * @see https://tools.ietf.org/html/rfc3253#section-4.4 199 | * @see https://tools.ietf.org/html/rfc3253#section-9.4 200 | */ 201 | public const CHECKIN = 'CHECKIN'; 202 | 203 | /** 204 | * A CHECKOUT request can be applied to a checked-in version-controlled 205 | * resource to allow modifications to the content and dead properties of 206 | * that version-controlled resource. 207 | * 208 | * If a CHECKOUT request fails, the server state preceding the request 209 | * MUST be restored. 210 | * 211 | * Marshalling: 212 | * 213 | * If a request body is included, it MUST be a DAV:checkout XML 214 | * element. 215 | * 216 | * 217 | * 218 | * ANY value: A sequence of elements with at most one DAV:fork-ok 219 | * element. 220 | * 221 | * 222 | * 223 | * If a response body for a successful request is included, it MUST 224 | * be a DAV:checkout-response XML element. 225 | * 226 | * 227 | * 228 | * The response MUST include a Cache-Control:no-cache header. 229 | * 230 | * Preconditions: 231 | * 232 | * (DAV:must-be-checked-in): If a version-controlled resource is 233 | * being checked out, it MUST have a DAV:checked-in property. 234 | * 235 | * (DAV:checkout-of-version-with-descendant-is-forbidden): If the 236 | * DAV:checkout-fork property of the version being checked out is 237 | * DAV:forbidden, the request MUST fail if a version identifies that 238 | * version in its DAV:predecessor-set. 239 | * 240 | * (DAV:checkout-of-version-with-descendant-is-discouraged): If the 241 | * DAV:checkout-fork property of the version being checked out is 242 | * DAV:discouraged, the request MUST fail if a version identifies 243 | * that version in its DAV:predecessor-set unless DAV:fork-ok is 244 | * specified in the request body. 245 | * 246 | * (DAV:checkout-of-checked-out-version-is-forbidden): If the 247 | * DAV:checkout-fork property of the version being checked out is 248 | * DAV:forbidden, the request MUST fail if a checked-out resource 249 | * identifies that version in its DAV:checked-out property. 250 | * 251 | * (DAV:checkout-of-checked-out-version-is-discouraged): If the 252 | * DAV:checkout-fork property of the version being checked out is 253 | * DAV:discouraged, the request MUST fail if a checked-out resource 254 | * identifies that version in its DAV:checked-out property unless 255 | * DAV:fork-ok is specified in the request body. 256 | * 257 | * Postconditions: 258 | * 259 | * (DAV:is-checked-out): The checked-out resource MUST have a 260 | * DAV:checked-out property that identifies the DAV:checked-in 261 | * version preceding the checkout. The version-controlled resource 262 | * MUST NOT have a DAV:checked-in property. 263 | * 264 | * (DAV:initialize-predecessor-set): The DAV:predecessor-set property 265 | * of the checked-out resource MUST be initialized to be the 266 | * DAV:checked-out version. 267 | * 268 | * Clemm, G., et al. 269 | * 270 | * Safe: no 271 | * Idempotent: yes 272 | * 273 | * @see https://tools.ietf.org/html/rfc3253#section-4.3 274 | * @see https://tools.ietf.org/html/rfc3253#section-8.8 275 | */ 276 | public const CHECKOUT = 'CHECKOUT'; 277 | 278 | /** 279 | * A LABEL request can be applied to a version to modify the labels that 280 | * select that version. The case of a label name MUST be preserved when 281 | * it is stored and retrieved. When comparing two label names to decide 282 | * if they match or not, a server SHOULD use a case-sensitive URL- 283 | * escaped UTF-8 encoded comparison of the two label names. 284 | * 285 | * If a LABEL request is applied to a checked in version-controlled 286 | * resource, the operation MUST be applied to the DAV:checked-in version 287 | * of that version-controlled resource. 288 | * 289 | * Marshalling: 290 | * 291 | * The request body MUST be a DAV:label element. 292 | * 293 | * 294 | * ANY value: A sequence of elements with at most one DAV:add, 295 | * DAV:set, or DAV:remove element. 296 | * 297 | * 298 | * 299 | * 300 | * 301 | * PCDATA value: string 302 | * 303 | * The request MAY include a Label header. 304 | * 305 | * The request MAY include a Depth header. If no Depth header is 306 | * included, Depth:0 is assumed. Standard depth semantics apply, and 307 | * the request is applied to the collection identified by the 308 | * request-URL and to all members of the collection that satisfy the 309 | * Depth value. If a Depth header is included and the request fails 310 | * on any resource, the response MUST be a 207 Multi-Status that 311 | * identifies all resources for which the request has failed. 312 | * 313 | * If a response body for a successful request is included, it MUST 314 | * be a DAV:label-response XML element. 315 | * 316 | * 317 | * 318 | * The response MUST include a Cache-Control:no-cache header. 319 | * 320 | * Preconditions: 321 | * 322 | * (DAV:must-be-checked-in): If the request-URL identifies a 323 | * version-controlled resource, the version-controlled resource MUST 324 | * be checked in. 325 | * 326 | * (DAV:must-select-version-in-history): If a Label request header is 327 | * included and the request-URL identifies a version-controlled 328 | * resource, the specified label MUST select a version in the version 329 | * history of the version-controlled resource. 330 | * 331 | * (DAV:add-must-be-new-label): If DAV:add is specified in the 332 | * request body, the specified label MUST NOT appear in the 333 | * DAV:label-name-set of any version in the version history of that 334 | * version-controlled resource. 335 | * 336 | * (DAV:label-must-exist): If DAV:remove is specified in the request 337 | * body, the specified label MUST appear in the DAV:label-name-set of 338 | * that version. 339 | * 340 | * Postconditions: 341 | * 342 | * (DAV:add-or-set-label): If DAV:add or DAV:set is specified in the 343 | * request body, the specified label MUST appear in the DAV:label- 344 | * name-set of the specified version, and MUST NOT appear in the 345 | * DAV:label-name-set of any other version in the version history of 346 | * that version. 347 | * 348 | * (DAV:remove-label): If DAV:remove is specified in the request 349 | * body, the specified label MUST NOT appear in the DAV:label-name- 350 | * set of any version in the version history of that version. 351 | * 352 | * Clemm, G., et al. 353 | * 354 | * Safe: no 355 | * Idempotent: yes 356 | * 357 | * @see https://tools.ietf.org/html/rfc3253#section-8.2 358 | */ 359 | public const LABEL = 'LABEL'; 360 | 361 | /** 362 | * The MERGE method performs the logical merge of a specified version 363 | * (the "merge source") into a specified version-controlled resource 364 | * (the "merge target"). If the merge source is neither an ancestor nor 365 | * a descendant of the DAV:checked-in or DAV:checked-out version of the 366 | * merge target, the MERGE checks out the merge target (if it is not 367 | * already checked out) and adds the URL of the merge source to the 368 | * DAV:merge-set of the merge target. It is then the client's 369 | * responsibility to update the content and dead properties of the 370 | * checked-out merge target so that it reflects the logical merge of the 371 | * merge source into the current state of the merge target. The client 372 | * indicates that it has completed the update of the merge target, by 373 | * deleting the merge source URL from the DAV:merge-set of the checked- 374 | * out merge target, and adding it to the DAV:predecessor-set. As an 375 | * error check for a client forgetting to complete a merge, the server 376 | * MUST fail an attempt to CHECKIN a version-controlled resource with a 377 | * non-empty DAV:merge-set. 378 | * 379 | * When a server has the ability to automatically update the content and 380 | * dead properties of the merge target to reflect the logical merge of 381 | * the merge source, it may do so unless DAV:no-auto-merge is specified 382 | * in the MERGE request body. In order to notify the client that a 383 | * merge source has been automatically merged, the MERGE request MUST 384 | * add the URL of the auto-merged source to the DAV:auto-merge-set 385 | * property of the merge target, and not to the DAV:merge-set property. 386 | * The client indicates that it has verified that the auto-merge is 387 | * valid, by deleting the merge source URL from the DAV:auto-merge-set, 388 | * and adding it to the DAV:predecessor-set. 389 | * 390 | * Multiple merge sources can be specified in a single MERGE request. 391 | * The set of merge sources for a MERGE request is determined from the 392 | * DAV:source element of the MERGE request body as follows: 393 | * 394 | * - If DAV:source identifies a version, that version is a merge 395 | * source. 396 | * 397 | * - If DAV:source identifies a version-controlled resource, the 398 | * DAV:checked-in version of that version-controlled resource is a 399 | * merge source. 400 | * 401 | * - If DAV:source identifies a collection, the DAV:checked-in version 402 | * of each version-controlled resource that is a member of that 403 | * collection is a merge source. 404 | * 405 | * The request-URL identifies the set of possible merge targets. If the 406 | * request-URL identifies a collection, any member of the configuration 407 | * rooted at the request-URL is a possible merge target. The merge 408 | * target of a particular merge source is the version-controlled or 409 | * checked-out resource whose DAV:checked-in or DAV:checked-out version 410 | * is from the same version history as the merge source. If a merge 411 | * source has no merge target, that merge source is ignored. 412 | * 413 | * The MERGE response identifies the resources that a client must modify 414 | * to complete the merge. It also identifies the resources modified by 415 | * the request, so that a client can efficiently update any cached state 416 | * it is maintaining. 417 | * 418 | * Marshalling: 419 | * 420 | * The request body MUST be a DAV:merge element. 421 | * 422 | * The set of merge sources is determined by the DAV:source element 423 | * in the request body. 424 | * 425 | * 426 | * ANY value: A sequence of elements with one DAV:source element, at 427 | * most one DAV:no-auto-merge element, at most one DAV:no-checkout 428 | * element, at most one DAV:prop element, and any legal set of 429 | * elements that can occur in a DAV:checkout element. 430 | * 431 | * 432 | * 433 | * prop: see RFC 2518, Section 12.11 434 | * 435 | * The response for a successful request MUST be a 207 Multi-Status, 436 | * where the DAV:multistatus XML element in the response body 437 | * identifies all resources that have been modified by the request. 438 | * 439 | * multistatus: see RFC 2518, Section 12.9 440 | * 441 | * The response to a successful request MUST include a Location 442 | * header containing the URL for the new version created by the 443 | * checkin. 444 | * 445 | * The response MUST include a Cache-Control:no-cache header. 446 | * 447 | * Preconditions: 448 | * 449 | * (DAV:cannot-merge-checked-out-resource): The DAV:source element 450 | * MUST NOT identify a checked-out resource. If the DAV:source 451 | * element identifies a collection, the collection MUST NOT have a 452 | * member that is a checked-out resource. 453 | * 454 | * (DAV:checkout-not-allowed): If DAV:no-checkout is specified in the 455 | * request body, it MUST be possible to perform the merge without 456 | * checking out any of the merge targets. 457 | * 458 | * All preconditions of the CHECKOUT operation apply to the checkouts 459 | * performed by the request. 460 | * 461 | * Postconditions: 462 | * 463 | * (DAV:ancestor-version): If a merge target is a version-controlled 464 | * or checked-out resource whose DAV:checked-in version or 465 | * DAV:checked-out version is the merge source or is a descendant of 466 | * the merge source, the merge target MUST NOT have been modified by 467 | * the MERGE. 468 | * 469 | * (DAV:descendant-version): If the merge target was a checked-in 470 | * version-controlled resource whose DAV:checked-in version was an 471 | * ancestor of the merge source, an UPDATE operation MUST have been 472 | * applied to the merge target to set its content and dead properties 473 | * to be those of the merge source. If the UPDATE method is not 474 | * supported, the merge target MUST have been checked out, the 475 | * content and dead properties of the merge target MUST have been set 476 | * to those of the merge source, and the merge source MUST have been 477 | * added to the DAV:auto-merge-set of the merge target. The merge 478 | * target MUST appear in a DAV:response XML element in the response 479 | * body. 480 | * 481 | * (DAV:checked-out-for-merge): If the merge target was a checked-in 482 | * version-controlled resource whose DAV:checked-in version was 483 | * neither a descendant nor an ancestor of the merge source, a 484 | * CHECKOUT MUST have been applied to the merge target. All XML 485 | * elements in the DAV:merge XML element that could appear in a 486 | * DAV:checkout XML element MUST have been used as arguments to the 487 | * CHECKOUT request. The merge target MUST appear in a DAV:response 488 | * XML element in the response body. 489 | * 490 | * (DAV:update-merge-set): If the DAV:checked-out version of the 491 | * merge target is neither equal to nor a descendant of the merge 492 | * source, the merge source MUST be added to either the DAV:merge-set 493 | * or the DAV:auto-merge-set of the merge target. The merge target 494 | * MUST appear in a DAV:response XML element in the response body. 495 | * 496 | * If a merge source has been added to the DAV:auto-merge-set, the 497 | * content and dead properties of the merge target MUST have been 498 | * modified by the server to reflect the result of a logical merge of 499 | * the merge source and the merge target. If a merge source has been 500 | * added to the DAV:merge-set, the content and dead properties of the 501 | * merge target MUST NOT have been modified by the server. If 502 | * DAV:no-auto-merge is specified in the request body, the merge 503 | * source MUST NOT have been added to the DAV:auto-merge-set. 504 | * 505 | * (DAV:report-properties): If DAV:prop is specified in the request 506 | * body, the properties specified in the DAV:prop element MUST be 507 | * reported in the DAV:response elements in the response body. 508 | * 509 | * Clemm, G., et al. 510 | * 511 | * Safe: no 512 | * Idempotent: yes. 513 | * 514 | * @see https://tools.ietf.org/html/rfc3253#section-11.2 515 | */ 516 | public const MERGE = 'MERGE'; 517 | 518 | /** 519 | * A MKACTIVITY request creates a new activity resource. A server MAY 520 | * restrict activity creation to particular collections, but a client 521 | * can determine the location of these collections from a DAV:activity- 522 | * collection-set OPTIONS request. 523 | * 524 | * Marshalling: 525 | * 526 | * If a request body is included, it MUST be a DAV:mkactivity XML 527 | * element. 528 | * 529 | * 530 | * 531 | * If a response body for a successful request is included, it MUST 532 | * be a DAV:mkactivity-response XML element. 533 | * 534 | * 535 | * 536 | * The response MUST include a Cache-Control:no-cache header. 537 | * 538 | * Preconditions: 539 | * 540 | * (DAV:resource-must-be-null): A resource MUST NOT exist at the 541 | * request-URL. 542 | * 543 | * (DAV:activity-location-ok): The request-URL MUST identify a 544 | * location where an activity can be created. 545 | * 546 | * Postconditions: 547 | * 548 | * (DAV:initialize-activity): A new activity exists at the request- 549 | * URL. The DAV:resourcetype of the activity MUST be DAV:activity. 550 | * 551 | * Clemm, G., et al. 552 | * 553 | * Safe: no 554 | * Idempotent: yes 555 | * 556 | * @see https://tools.ietf.org/html/rfc3253#section-13.5 557 | */ 558 | public const MKACTIVITY = 'MKACTIVITY'; 559 | 560 | /** 561 | * A MKWORKSPACE request creates a new workspace resource. A server MAY 562 | * restrict workspace creation to particular collections, but a client 563 | * can determine the location of these collections from a 564 | * DAV:workspace-collection-set OPTIONS request (see Section 6.4). 565 | * 566 | * If a MKWORKSPACE request fails, the server state preceding the 567 | * request MUST be restored. 568 | * 569 | * Marshalling: 570 | * 571 | * If a request body is included, it MUST be a DAV:mkworkspace XML 572 | * element. 573 | * 574 | * 575 | * 576 | * If a response body for a successful request is included, it MUST 577 | * be a DAV:mkworkspace-response XML element. 578 | * 579 | * 580 | * 581 | * The response MUST include a Cache-Control:no-cache header. 582 | * 583 | * Preconditions: 584 | * 585 | * (DAV:resource-must-be-null): A resource MUST NOT exist at the 586 | * request-URL. 587 | * 588 | * (DAV:workspace-location-ok): The request-URL MUST identify a 589 | * location where a workspace can be created. 590 | * 591 | * Postconditions: 592 | * 593 | * (DAV:initialize-workspace): A new workspace exists at the 594 | * request-URL. The DAV:resourcetype of the workspace MUST be 595 | * DAV:collection. The DAV:workspace of the workspace MUST identify 596 | * the workspace. 597 | * 598 | * Clemm, G., et al. 599 | * 600 | * Safe: no 601 | * Idempotent: yes 602 | * 603 | * @see https://tools.ietf.org/html/rfc3253#section-6.3 604 | */ 605 | public const MKWORKSPACE = 'MKWORKSPACE'; 606 | 607 | /** 608 | * A REPORT request is an extensible mechanism for obtaining information 609 | * about a resource. Unlike a resource property, which has a single 610 | * value, the value of a report can depend on additional information 611 | * specified in the REPORT request body and in the REPORT request 612 | * headers. 613 | * 614 | * Marshalling: 615 | * 616 | * The body of a REPORT request specifies which report is being 617 | * requested, as well as any additional information that will be used 618 | * to customize the report. 619 | * 620 | * The request MAY include a Depth header. If no Depth header is 621 | * included, Depth:0 is assumed. 622 | * 623 | * The response body for a successful request MUST contain the 624 | * requested report. 625 | * 626 | * If a Depth request header is included, the response MUST be a 207 627 | * Multi-Status. The request MUST be applied separately to the 628 | * collection itself and to all members of the collection that 629 | * satisfy the Depth value. The DAV:prop element of a DAV:response 630 | * for a given resource MUST contain the requested report for that 631 | * resource. 632 | * 633 | * Preconditions: 634 | * 635 | * (DAV:supported-report): The specified report MUST be supported by 636 | * the resource identified by the request-URL. 637 | * 638 | * Postconditions: 639 | * 640 | * (DAV:no-modification): The REPORT method MUST NOT have changed the 641 | * content or dead properties of any resource. 642 | * 643 | * Clemm, G., et al. 644 | * 645 | * Safe: yes 646 | * Idempotent: yes 647 | * 648 | * @see https://tools.ietf.org/html/rfc3253#section-3.6 649 | */ 650 | public const REPORT = 'REPORT'; 651 | 652 | /** 653 | * An UNCHECKOUT request can be applied to a checked-out version- 654 | * controlled resource to cancel the CHECKOUT and restore the pre- 655 | * CHECKOUT state of the version-controlled resource. 656 | * 657 | * If an UNCHECKOUT request fails, the server MUST undo any partial 658 | * effects of the UNCHECKOUT request. 659 | * 660 | * Marshalling: 661 | * 662 | * If a request body is included, it MUST be a DAV:uncheckout XML 663 | * element. 664 | * 665 | * 666 | * 667 | * If a response body for a successful request is included, it MUST 668 | * be a DAV:uncheckout-response XML element. 669 | * 670 | * 671 | * 672 | * The response MUST include a Cache-Control:no-cache header. 673 | * 674 | * Preconditions: 675 | * 676 | * (DAV:must-be-checked-out-version-controlled-resource): The 677 | * request-URL MUST identify a version-controlled resource with a 678 | * DAV:checked-out property. 679 | * 680 | * Postconditions: 681 | * 682 | * (DAV:cancel-checked-out): The value of the DAV:checked-in property 683 | * is that of the DAV:checked-out property prior to the request, and 684 | * the DAV:checked-out property has been removed. 685 | * 686 | * (DAV:restore-content-and-dead-properties): The content and dead 687 | * properties of the version-controlled resource are copies of its 688 | * DAV:checked-in version. 689 | * 690 | * Clemm, G., et al. 691 | * 692 | * Safe: no 693 | * Idempotent: yes 694 | * 695 | * @see https://tools.ietf.org/html/rfc3253#section-4.5 696 | */ 697 | public const UNCHECKOUT = 'UNCHECKOUT'; 698 | 699 | /** 700 | * The UPDATE method modifies the content and dead properties of a 701 | * checked-in version-controlled resource (the "update target") to be 702 | * those of a specified version (the "update source") from the version 703 | * history of that version-controlled resource. 704 | * 705 | * The response to an UPDATE request identifies the resources modified 706 | * by the request, so that a client can efficiently update any cached 707 | * state it is maintaining. Extensions to the UPDATE method allow 708 | * multiple resources to be modified from a single UPDATE request (see 709 | * Section 12.13). 710 | * 711 | * Marshalling: 712 | * 713 | * The request body MUST be a DAV:update element. 714 | * 715 | * 716 | * ANY value: A sequence of elements with at most one DAV:version 717 | * element and at most one DAV:prop element. 718 | * 719 | * prop: see RFC 2518, Section 12.11 720 | * 721 | * The response for a successful request MUST be a 207 Multi-Status, 722 | * where the DAV:multistatus XML element in the response body 723 | * identifies all resources that have been modified by the request. 724 | * 725 | * multistatus: see RFC 2518, Section 12.9 726 | * 727 | * The response MUST include a Cache-Control:no-cache header. 728 | * 729 | * Postconditions: 730 | * 731 | * (DAV:update-content-and-properties): If the DAV:version element in 732 | * the request body identified a version that is in the same version 733 | * history as the DAV:checked-in version of a version-controlled 734 | * resource identified by the request-URL, then the content and dead 735 | * properties of that version-controlled resource MUST be the same as 736 | * those of the version specified by the DAV:version element, and the 737 | * DAV:checked-in property of the version-controlled resource MUST 738 | * identify that version. The request-URL MUST appear in a 739 | * DAV:response element in the response body. 740 | * 741 | * (DAV:report-properties): If DAV:prop is specified in the request 742 | * body, the properties specified in the DAV:prop element MUST be 743 | * reported in the DAV:response elements in the response body. 744 | * 745 | * Clemm, G., et al. 746 | * 747 | * Safe: no 748 | * Idempotent: yes 749 | * 750 | * @see https://tools.ietf.org/html/rfc3253#section-7.1 751 | */ 752 | public const UPDATE = 'UPDATE'; 753 | 754 | /** 755 | * A VERSION-CONTROL request can be used to create a version-controlled 756 | * resource at the request-URL. It can be applied to a versionable 757 | * resource or to a version-controlled resource. 758 | * 759 | * If the request-URL identifies a versionable resource, a new version 760 | * history resource is created, a new version is created whose content 761 | * and dead properties are copied from the versionable resource, and the 762 | * resource is given a DAV:checked-in property that is initialized to 763 | * identify this new version. 764 | * 765 | * If the request-URL identifies a version-controlled resource, the 766 | * resource just remains under version-control. This allows a client to 767 | * be unaware of whether or not a server automatically puts a resource 768 | * under version control when it is created. 769 | * 770 | * If a VERSION-CONTROL request fails, the server state preceding the 771 | * request MUST be restored. 772 | * 773 | * Marshalling: 774 | * 775 | * If a request body is included, it MUST be a DAV:version-control 776 | * XML element. 777 | * 778 | * 779 | * 780 | * If a response body for a successful request is included, it MUST 781 | * be a DAV:version-control-response XML element. Note that this 782 | * document does not define any elements for the VERSION-CONTROL 783 | * response body, but the DAV:version-control-response element is 784 | * defined to ensure interoperability between future extensions that 785 | * do define elements for the VERSION-CONTROL response body. 786 | * 787 | * 788 | * 789 | * Postconditions: 790 | * 791 | * (DAV:put-under-version-control): If the request-URL identified a 792 | * versionable resource at the time of the request, the request MUST 793 | * have created a new version history and MUST have created a new 794 | * version resource in that version history. The resource MUST have 795 | * a DAV:checked-in property that identifies the new version. The 796 | * content, dead properties, and DAV:resourcetype of the new version 797 | * MUST be the same as those of the resource. Note that an 798 | * implementation can choose to locate the version history and 799 | * version resources anywhere that it wishes. In particular, it 800 | * could locate them on the same host and server as the version- 801 | * controlled resource, on a different virtual host maintained by the 802 | * same server, on the same host maintained by a different server, or 803 | * on a different host maintained by a different server. 804 | * 805 | * (DAV:must-not-change-existing-checked-in-out): If the request-URL 806 | * identified a resource already under version control at the time of 807 | * the request, the request MUST NOT change the DAV:checked-in or 808 | * DAV:checked-out property of that version-controlled resource. 809 | * 810 | * Clemm, G., et al. 811 | * 812 | * Safe: no 813 | * Idempotent: yes 814 | * 815 | * @see https://tools.ietf.org/html/rfc3253#section-3.5 816 | */ 817 | public const VERSION_CONTROL = 'VERSION-CONTROL'; 818 | } 819 | --------------------------------------------------------------------------------