Accept absense of HTTP content-type header
This commit is contained in:
parent
5b4bdf223b
commit
aa3350ec2f
@ -10,7 +10,7 @@ let response (headers, body) =
|
|||||||
| Some "application/msgpack" | Some "application/octet-stream"
|
| Some "application/msgpack" | Some "application/octet-stream"
|
||||||
| Some "text/plain" | Some "text/plain; charset=utf-8" -> Ok body
|
| Some "text/plain" | Some "text/plain; charset=utf-8" -> Ok body
|
||||||
| Some x -> Error ("Invalid content-type: " ^ x)
|
| Some x -> Error ("Invalid content-type: " ^ x)
|
||||||
| None -> Error ("No content-type")
|
| None -> Ok body
|
||||||
|
|
||||||
let http_apply fn uri = Lwt_main.run (http_body fn uri)
|
let http_apply fn uri = Lwt_main.run (http_body fn uri)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user