Skip to content

Commit 1869ef0

Browse files
authored
Merge pull request #734 from lightpanda-io/url_resolve_buffer_size
increase buffer size 1024->4096
2 parents 6ca57c1 + e7007b4 commit 1869ef0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/url.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ pub const URL = struct {
7070
}
7171

7272
pub fn resolve(self: *const URL, arena: Allocator, url: []const u8) !URL {
73-
var buf = try arena.alloc(u8, 1024);
73+
var buf = try arena.alloc(u8, 4096);
7474
const new_uri = try self.uri.resolve_inplace(url, &buf);
7575
return fromURI(arena, &new_uri);
7676
}
@@ -145,7 +145,7 @@ test "Url resolve size" {
145145
var url_string: [511]u8 = undefined; // Currently this is the largest url we support, it is however recommmended to at least support 2000 characters
146146
@memset(&url_string, 'a');
147147

148-
var buf: [2048]u8 = undefined; // This is approximately the required size to support the current largest supported URL
148+
var buf: [8192]u8 = undefined; // This is approximately the required size to support the current largest supported URL
149149
var fba = std.heap.FixedBufferAllocator.init(&buf);
150150
const out_url = try url.resolve(fba.allocator(), &url_string);
151151

0 commit comments

Comments
 (0)