support for >16KiB requests
All checks were successful
AWS-Zig Build / build-zig-0.11.0-amd64-host (push) Successful in 7m44s
All checks were successful
AWS-Zig Build / build-zig-0.11.0-amd64-host (push) Successful in 7m44s
This commit is contained in:
parent
de914ccedf
commit
ed96e2ff66
|
@ -216,7 +216,14 @@ pub const AwsHttp = struct {
|
||||||
try @import("http_client_17015_issue.zig").start(&req);
|
try @import("http_client_17015_issue.zig").start(&req);
|
||||||
// try req.start();
|
// try req.start();
|
||||||
if (request_cp.body.len > 0) {
|
if (request_cp.body.len > 0) {
|
||||||
try req.writeAll(request_cp.body);
|
// Workaround for https://github.com/ziglang/zig/issues/15626
|
||||||
|
const max_bytes: usize = 1 << 14;
|
||||||
|
var inx: usize = 0;
|
||||||
|
while (request_cp.body.len > inx) {
|
||||||
|
try req.writeAll(request_cp.body[inx..@min(request_cp.body.len, inx + max_bytes)]);
|
||||||
|
inx += max_bytes;
|
||||||
|
}
|
||||||
|
|
||||||
try req.finish();
|
try req.finish();
|
||||||
}
|
}
|
||||||
try req.wait();
|
try req.wait();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user