mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-07-30 17:25:58 -04:00
Merge pull request #2935 from lightpanda-io/robots-skip-non-200-body
robots, mem: don't buffer body on a non-200 robots response
This commit is contained in:
@@ -220,7 +220,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