mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-07-31 09:46:05 -04:00
robots, mem: don't buffer body on a non-200 robots response
This commit is contained in:
@@ -216,7 +216,9 @@ const RobotsContext = struct {
|
||||
|
||||
fn dataCallback(transfer: *Transfer, data: []const u8) anyerror!void {
|
||||
const self: *RobotsContext = @ptrCast(@alignCast(transfer.req.ctx));
|
||||
try self.buffer.appendSlice(self.arena, data);
|
||||
if (self.status == 200) {
|
||||
try self.buffer.appendSlice(self.arena, data);
|
||||
}
|
||||
}
|
||||
|
||||
fn doneCallback(ctx_ptr: *anyopaque) anyerror!void {
|
||||
|
||||
Reference in New Issue
Block a user