net.http.server: Return request ID in header to aid debugging

Eases locating the request in logs
This commit is contained in:
Kim Alvefur 2023-05-29 01:42:31 +02:00
parent 9480954e92
commit 4d9931786d

View file

@ -260,7 +260,7 @@ function handle_request(conn, request, finish_cb)
request = request;
is_head_request = is_head_request;
status_code = 200;
headers = { date = date_header, connection = response_conn_header };
headers = { date = date_header; connection = response_conn_header; x_request_id = request.id };
persistent = persistent;
conn = conn;
send = _M.send_response;