aboutsummaryrefslogtreecommitdiff
path: root/lib/http.ml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/http.ml')
-rw-r--r--lib/http.ml3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/http.ml b/lib/http.ml
index 9799d7a..8927f47 100644
--- a/lib/http.ml
+++ b/lib/http.ml
@@ -4,7 +4,6 @@ open Cohttp
module Base = struct
exception Invalid_Method
- exception Bad_response_headers
let rl = ref Rl.empty
@@ -30,7 +29,7 @@ module Base = struct
(match Response.headers resp
|> Rl.rl_of_header with
| Some r -> Mvar.put (Rl.find_exn !rl path) r
- | None -> raise Bad_response_headers)
+ | None -> return ())
>>= fun () ->
match resp |> Response.status |> Code.code_of_status with
| 200 -> body |> Cohttp_async.Body.to_string >>| Yojson.Safe.from_string >>= Deferred.Or_error.return