Plasma GitLab Archive
Projects Blog Knowledge

Module Webdav_http


module Webdav_http: sig .. end
Extension of Nethttp for WebDAV support

type webdav_status = [ `Accepted
| `Bad_gateway
| `Bad_request
| `Conflict
| `Continue
| `Created
| `Expectation_failed
| `Failed_dependency
| `Forbidden
| `Found
| `Gateway_timeout
| `Gone
| `Http_version_not_supported
| `Insufficient_storage
| `Internal_server_error
| `Length_required
| `Locked
| `Method_not_allowed
| `Moved_permanently
| `Multi_status
| `Multiple_choices
| `No_content
| `Non_authoritative
| `Not_acceptable
| `Not_found
| `Not_implemented
| `Not_modified
| `Ok
| `Partial_content
| `Payment_required
| `Precondition_failed
| `Proxy_auth_required
| `Request_entity_too_large
| `Request_timeout
| `Request_uri_too_long
| `Requested_range_not_satisfiable
| `Reset_content
| `See_other
| `Service_unavailable
| `Switching_protocols
| `Temporary_redirect
| `Unauthorized
| `Unprocessable_entity
| `Unsupported_media_type
| `Use_proxy ]
val int_of_webdav_status : webdav_status -> int
Returns the integer code for a status value
val string_of_webdav_status : webdav_status -> string
The explanatory text
val webdav_status_of_int : int -> webdav_status
Returns the status value for an integer code, or raises Not_found
val webdav_proto : string
"HTTP/1.1" - what is put into generated inner status lines
type depth = [ `Infinity | `One | `Zero ] 
Whether the operation affects only the request URL, the children of the request URL, or the whole tree there
type dav = [ `Class1 | `Class2 | `Class3 | `Token of string | `URL of string ] 
DAV compliance

Representation of If header



The following type definition allows readable If expressions. For example,

       (<urn:uuid:181d4fae-7d8c-11d0-a765-00a0c91e6bf2>
         ["I am an ETag"])
         (["I am another ETag"])
    

would be represented as

      `Self_target
         (`Or
            [`And
               [`State_token "urn:uuid:181d4fae-7d8c-11d0-a765-00a0c91e6bf2";
                `Etag(`Strong "I am an ETag")
               ];
             `And
               [`Etag(`Strong "I am another ETag")]
            ]
         )
    

type if_condition = [ `Self_target of if_self_or_condition
| `URL_target of if_url_or_condition ]
A `Self_target is an If expression about the request URI of the request including the If header. A `URL_target is an If expression about arbitrary URLs.
type if_self_or_condition = [ `Or of if_and_condition list ] 
type if_url_or_condition = [ `Or of (string * if_and_condition) list ] 
type if_and_condition = [ `And of if_atom list ] 
type if_atom = [ `Etag of Nethttp.etag
| `Not of if_atom
| `State_token of string ]
An atom of an If expression can be negated, or it can be a state token (lock token), or it can be an etag.

Note that state tokens are URIs, and reserved characters must be escaped to avoid confusion of the recipient of the message. Reserved characters are here especially double quotes, and "<" and ">" and spaces.

module Header: sig .. end
This module contains extensions of Nethttp.Header for parsing and setting header fields of WebDAV requests and responses.
This web site is published by Informatikbüro Gerd Stolpmann
Powered by Caml