Httpd.resp_plain and friends

This commit is contained in:
Tony Garnock-Jones 2012-04-28 18:07:48 -04:00
parent e968d78fc4
commit ef5c9c061a
1 changed files with 8 additions and 0 deletions

View File

@ -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"