diff --git a/src/Tiny_httpd_server.ml b/src/Tiny_httpd_server.ml index 218272df..ba797118 100644 --- a/src/Tiny_httpd_server.ml +++ b/src/Tiny_httpd_server.ml @@ -64,6 +64,7 @@ module Meth = struct | `POST | `HEAD | `DELETE + | `OPTIONS ] let to_string = function @@ -72,6 +73,7 @@ module Meth = struct | `HEAD -> "HEAD" | `POST -> "POST" | `DELETE -> "DELETE" + | `OPTIONS -> "OPTIONS" let pp out s = Format.pp_print_string out (to_string s) let of_string = function @@ -80,6 +82,7 @@ module Meth = struct | "POST" -> `POST | "HEAD" -> `HEAD | "DELETE" -> `DELETE + | "OPTIONS" -> `OPTIONS | s -> bad_reqf 400 "unknown method %S" s end diff --git a/src/Tiny_httpd_server.mli b/src/Tiny_httpd_server.mli index 075e14f7..9f41c376 100644 --- a/src/Tiny_httpd_server.mli +++ b/src/Tiny_httpd_server.mli @@ -21,6 +21,7 @@ module Meth : sig | `POST | `HEAD | `DELETE + | `OPTIONS ] (** A HTTP method. For now we only handle a subset of these.