Lightpanda: the headless browser designed for AI and automation
Merge pull request #3585 from lightpanda-io/webdriver-element
Karl Seguin709567e2d873
diff --cc src/server/bidi/http_command.zigindex 2a7f4d8d3,24b89bf9c..adad75d4b--- a/src/server/bidi/http_command.zig+++ b/src/server/bidi/http_command.zig@@@ -107,10 -282,13 +282,14 @@@ fn parseBody(comptime T: type, arena: A// POSTs without parameters still send a body ("{}"); nothing to readreturn {};}+ if (@typeInfo(T).@"struct".fields.len == 0) {+ // everything the command takes came from the path+ return .{};+ }return std.json.parseFromSliceLeaky(T, arena, body, .{.ignore_unknown_fields = true,- // body is the connection's read buffer, reused once the request is parked+ // body is the connection's read buffer, if we park the connection, that+ // buffer will be re-used. Our result cannot point into it..allocate = .alloc_always,}) catch |err| switch (err) {error.OutOfMemory => error.OutOfMemory,