mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-29 07:03:29 +00:00
use content length to reserve body size
This commit is contained in:
@@ -172,6 +172,10 @@ pub fn fetch(input: RequestInput, options: ?RequestInit, page: *Page) !Env.Promi
|
||||
};
|
||||
}
|
||||
|
||||
if (transfer.getContentLength()) |cl| {
|
||||
try self.body.ensureTotalCapacity(self.arena, cl);
|
||||
}
|
||||
|
||||
var it = transfer.responseHeaderIterator();
|
||||
while (it.next()) |hdr| {
|
||||
const joined = try std.fmt.allocPrint(self.arena, "{s}: {s}", .{ hdr.name, hdr.value });
|
||||
|
||||
Reference in New Issue
Block a user