mirror of
https://github.com/c-cube/tiny_httpd.git
synced 2025-12-12 14:00:37 -05:00
Also close connection if response's headers contains connection: close
This commit is contained in:
parent
6a3ffdfd9b
commit
893475734b
1 changed files with 2 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue