add target to ZigRequest
All checks were successful
Build / build (push) Successful in 1m27s
Build / sign (push) Successful in 37s
Build / deploy (push) Successful in 46s

This commit is contained in:
Emil Lerch 2023-10-05 15:58:36 -07:00
parent 0afe78a346
commit c44ad2ba84
Signed by: lobo
GPG Key ID: A7B62D657EF764F8

View File

@ -36,6 +36,7 @@ threadlocal var allocator: ?*std.mem.Allocator = null;
const log = std.log.scoped(.interface);
pub const ZigRequest = struct {
target: []const u8,
method: [:0]u8,
content: []u8,
headers: []Header,
@ -107,6 +108,7 @@ pub fn handleRequest(request: *Request, zigRequestHandler: ZigRequestHandler) ?*
zigRequestHandler(
alloc,
.{
.target = request.target[0..request.target_len],
.method = request.method[0..request.method_len :0],
.content = request.content[0..request.content_len],
.headers = request.headers[0..request.headers_len],