From ef5c9c061a196eff9c709b8b37d740de126c669b Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Sat, 28 Apr 2012 18:07:48 -0400 Subject: [PATCH] Httpd.resp_plain and friends --- httpd.ml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/httpd.ml b/httpd.ml index cd89f5d..b528411 100644 --- a/httpd.ml +++ b/httpd.ml @@ -94,6 +94,14 @@ let resp_html code reason extra_headers title content = let resp_html_ok extra_headers title content = resp_html 200 "OK" extra_headers title content +let resp_plain code reason extra_headers text = + resp_generic code reason + (text_content_type_header :: extra_headers) + (Fixed text) + +let resp_plain_ok extra_headers text = + resp_plain 200 "OK" extra_headers text + let resp_redirect_permanent new_path = resp_html_doc 301 "Moved permanently" ["Location", new_path] (html_error_doc 301 "Moved permanently"