From 70bca4ce92d559101fbb4eb38a3426545ddb2292 Mon Sep 17 00:00:00 2001 From: Cedric Cellier Date: Sat, 20 Aug 2022 09:50:12 +0200 Subject: [PATCH] Use text/plain as a default CONTENT_TYPE --- cgi.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cgi.ml b/cgi.ml index 8d85ff2..2706029 100644 --- a/cgi.ml +++ b/cgi.ml @@ -218,7 +218,7 @@ let read_body = let parse_args () = let req_method = safe_getenv "REQUEST_METHOD" - and mime_type = safe_getenv "CONTENT_TYPE" + and mime_type = safe_getenv ~default:"text/plain" "CONTENT_TYPE" and get_params = safe_getenv ~default:"" "QUERY_STRING" in let form_params = if List.mem req_method [ "POST" ; "PUT" ] &&