From 03f7228662d9271187bd37d2a34f4241e5c7f7f2 Mon Sep 17 00:00:00 2001 From: Emil Lerch Date: Sun, 29 May 2022 11:16:55 -0700 Subject: [PATCH] fix rest_xml_no_input integration test --- src/aws.zig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/aws.zig b/src/aws.zig index fe7c886..8381736 100644 --- a/src/aws.zig +++ b/src/aws.zig @@ -399,7 +399,9 @@ pub fn Request(comptime action: anytype) type { const xml_options = xml_shaper.ParseOptions{ .allocator = options.client.allocator }; var body: []const u8 = result.body; var free_body = false; - if (std.mem.lastIndexOf(u8, result.body[result.body.len - 20 ..], "Response>") == null) { + if (std.mem.lastIndexOf(u8, result.body[result.body.len - 20 ..], "Response>") == null and + std.mem.lastIndexOf(u8, result.body[result.body.len - 20 ..], "Result>") == null) + { free_body = true; // chop the "" from the front const start = if (std.mem.indexOf(u8, result.body, "?>")) |i| i else 0;