Also close connection if response's headers contains connection: close

This commit is contained in:
craff 2021-12-15 18:39:09 -10:00
parent 6a3ffdfd9b
commit 893475734b

View file

@ -1034,6 +1034,8 @@ let handle_client_ (self:t) (client_sock:Unix.file_descr) : unit =
let resp r =
try
let r = post_process_resp r in
if Headers.get "connection" r.Response.headers = Some"close" then
continue := false;
Response.output_ oc r
with Sys_error _ -> continue := false
in