1
0
Fork 0
mirror of https://github.com/zigzap/zap.git synced 2025-10-21 07:34:08 +00:00

return unsupported in case of arrays or unsupported types

This commit is contained in:
Rene Schallner 2023-09-12 20:05:58 +02:00
parent 5adf7d0e02
commit fe9937f331

View file

@ -654,7 +654,7 @@ pub fn Fiobj2HttpParam(o: fio.FIOBJ, a: std.mem.Allocator, dupe_string: bool) !?
fio.FIOBJ_T_STRING => { fio.FIOBJ_T_STRING => {
const fiostr = fio.fiobj_obj2cstr(data); const fiostr = fio.fiobj_obj2cstr(data);
if (fiostr.len == 0) { if (fiostr.len == 0) {
data_slice = "(zap: epmty string data)"; data_slice = "(zap: empty string data)";
std.log.warn("WARNING: HTTP param binary file has empty string object\n", .{}); std.log.warn("WARNING: HTTP param binary file has empty string object\n", .{});
} else { } else {
data_slice = fiostr.data[0..fiostr.len]; data_slice = fiostr.data[0..fiostr.len];
@ -665,6 +665,7 @@ pub fn Fiobj2HttpParam(o: fio.FIOBJ, a: std.mem.Allocator, dupe_string: bool) !?
}, },
else => { else => {
// don't know what to do // don't know what to do
return .{ .Unsupported = null };
}, },
} }