From 8d7dd43ba1b30e3c265857ebfe2d65ba7851464b Mon Sep 17 00:00:00 2001 From: barti2du Date: Tue, 19 Dec 2023 18:07:11 +0200 Subject: [PATCH] request: Make client_addr public --- src/Tiny_httpd_server.ml | 1 + src/Tiny_httpd_server.mli | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/Tiny_httpd_server.ml b/src/Tiny_httpd_server.ml index d6757725..564181c5 100644 --- a/src/Tiny_httpd_server.ml +++ b/src/Tiny_httpd_server.ml @@ -176,6 +176,7 @@ module Request = struct let headers self = self.headers let host self = self.host + let client_addr self = self.client_addr let meth self = self.meth let path self = self.path let body self = self.body diff --git a/src/Tiny_httpd_server.mli b/src/Tiny_httpd_server.mli index f0aef7fa..621f6ed9 100644 --- a/src/Tiny_httpd_server.mli +++ b/src/Tiny_httpd_server.mli @@ -127,6 +127,10 @@ module Request : sig val host : _ t -> string (** Host field of the request. It also appears in the headers. *) + val client_addr : _ t -> Unix.sockaddr + (** Client address of the request. + @since NEXT_RELEASE *) + val meth : _ t -> Meth.t (** Method for the request. *)