Comparison

net/http/server.lua @ 13118:6b5e92949051

net.http.server: Return request ID in header to aid debugging Eases locating the request in logs
author Kim Alvefur <zash@zash.se>
date Mon, 29 May 2023 01:42:31 +0200
parent 13103:42c2a9787242
child 13260:da21185fd026
comparison
equal deleted inserted replaced
13117:7eb6244b4984 13118:6b5e92949051
258 id = request.id; 258 id = request.id;
259 log = request.log; 259 log = request.log;
260 request = request; 260 request = request;
261 is_head_request = is_head_request; 261 is_head_request = is_head_request;
262 status_code = 200; 262 status_code = 200;
263 headers = { date = date_header, connection = response_conn_header }; 263 headers = { date = date_header; connection = response_conn_header; x_request_id = request.id };
264 persistent = persistent; 264 persistent = persistent;
265 conn = conn; 265 conn = conn;
266 send = _M.send_response; 266 send = _M.send_response;
267 write_headers = _M.write_headers; 267 write_headers = _M.write_headers;
268 send_file = _M.send_file; 268 send_file = _M.send_file;