mirror of
https://github.com/c-cube/tiny_httpd.git
synced 2025-12-06 11:15:35 -05:00
expose Bad_req in Server
This commit is contained in:
parent
e5191f0fd7
commit
bc34363f60
2 changed files with 5 additions and 0 deletions
|
|
@ -2,6 +2,8 @@ open Common_
|
||||||
|
|
||||||
type resp_error = Response_code.t * string
|
type resp_error = Response_code.t * string
|
||||||
|
|
||||||
|
exception Bad_req = Common_.Bad_req
|
||||||
|
|
||||||
module Middleware = struct
|
module Middleware = struct
|
||||||
type handler = IO.Input.t Request.t -> resp:(Response.t -> unit) -> unit
|
type handler = IO.Input.t Request.t -> resp:(Response.t -> unit) -> unit
|
||||||
type t = handler -> handler
|
type t = handler -> handler
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,9 @@
|
||||||
@since 0.13
|
@since 0.13
|
||||||
*)
|
*)
|
||||||
|
|
||||||
|
exception Bad_req of int * string
|
||||||
|
(** Exception raised to exit request handlers with a code+error message *)
|
||||||
|
|
||||||
(** {2 Middlewares}
|
(** {2 Middlewares}
|
||||||
|
|
||||||
A middleware can be inserted in a handler to modify or observe
|
A middleware can be inserted in a handler to modify or observe
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue