atproto pds in zig pds.zat.dev
pds atproto
25

Configure Feed

Select the types of activity you want to include in your feed.

Avoid duplicate sync content length

zzstoatzz (May 24, 2026, 10:01 PM -0500) d2b4139b 7fd4b093

-4
-4
src/atproto/sync.zig
··· 27 27 const blob = store.getBlob(allocator, did, cid) orelse { 28 28 return http_api.xrpcError(request, .not_found, "BlobNotFound", "Blob not found"); 29 29 }; 30 - const content_length = try std.fmt.allocPrint(allocator, "{d}", .{blob.data.len}); 31 30 const headers = [_]http.Header{ 32 31 .{ .name = "content-type", .value = blob.mime_type }, 33 - .{ .name = "content-length", .value = content_length }, 34 32 .{ .name = "cache-control", .value = "public, max-age=31536000, immutable" }, 35 33 .{ .name = "x-content-type-options", .value = "nosniff" }, 36 34 .{ .name = "access-control-allow-origin", .value = "*" }, ··· 55 53 const body = store.writeRepoCar(allocator, did) catch { 56 54 return http_api.xrpcError(request, .not_found, "RepoNotFound", "Repo not found"); 57 55 }; 58 - const content_length = try std.fmt.allocPrint(allocator, "{d}", .{body.len}); 59 56 const headers = [_]http.Header{ 60 57 .{ .name = "content-type", .value = "application/vnd.ipld.car" }, 61 - .{ .name = "content-length", .value = content_length }, 62 58 .{ .name = "access-control-allow-origin", .value = "*" }, 63 59 .{ .name = "access-control-allow-private-network", .value = "true" }, 64 60 .{ .name = "connection", .value = "close" },