mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-07-30 09:16:07 -04:00
properly dupe authored header names
This commit is contained in:
@@ -94,7 +94,7 @@ pub fn init(input: Input, options: ?InitOpts, exec: *const Execution) !js.Promis
|
||||
|
||||
try authored.ensureUnusedCapacity(exec.call_arena, h._list._entries.items.len);
|
||||
for (h._list._entries.items) |entry| {
|
||||
authored.appendAssumeCapacity(entry.name.str());
|
||||
authored.appendAssumeCapacity(try exec.call_arena.dupe(u8, entry.name.str()));
|
||||
}
|
||||
}
|
||||
try exec.headersForRequest(&headers);
|
||||
|
||||
@@ -266,7 +266,7 @@ pub fn send(self: *XMLHttpRequest, body_: ?BodyInit, exec_: *const Execution) !v
|
||||
const req_headers = self._request_headers._list._entries.items;
|
||||
var authored: std.ArrayList([]const u8) = try .initCapacity(exec.call_arena, req_headers.len);
|
||||
for (req_headers) |entry| {
|
||||
authored.appendAssumeCapacity(entry.name.str());
|
||||
authored.appendAssumeCapacity(try exec.call_arena.dupe(u8, entry.name.str()));
|
||||
}
|
||||
|
||||
if (cookie_support) {
|
||||
|
||||
Reference in New Issue
Block a user