add assert to SyncRequest headerCallback

This commit is contained in:
Muki Kiboigo
2026-04-27 07:24:52 -07:00
parent 1370f6805b
commit 0ecf981f7e

View File

@@ -425,6 +425,7 @@ const SyncContext = struct {
fn headerCallback(response: Response) anyerror!bool {
const self: *SyncContext = @ptrCast(@alignCast(response.ctx));
lp.assert(response.status() != null, "HttpClient.SyncRequest.headerCallback", .{ .value = response.status() });
self.status = response.status().?;
if (response.contentLength()) |cl| {
try self.body.ensureTotalCapacity(self.allocator, cl);