aboutsummaryrefslogtreecommitdiff
path: root/misctools
diff options
context:
space:
mode:
authorGravatar Ciro Spaciari <ciro.spaciari@gmail.com> 2023-08-22 00:30:34 -0300
committerGravatar GitHub <noreply@github.com> 2023-08-21 20:30:34 -0700
commit9027484ae1a9eaf9769d79828db48de66450a3fc (patch)
treee6b679132046bbc0ef254a170c0b0ec3030d3fa2 /misctools
parent91eacade975a522f7ad3d62185ff8adace3aad97 (diff)
downloadbun-9027484ae1a9eaf9769d79828db48de66450a3fc.tar.gz
bun-9027484ae1a9eaf9769d79828db48de66450a3fc.tar.zst
bun-9027484ae1a9eaf9769d79828db48de66450a3fc.zip
fetch(stream) add stream support for compressed and uncompressed data (#4127)
* streams non compressed data in 64kb chunks (at least) * fmt * wip remove pause * fix default streaming and buffering * fix atomic lags * fix size * make chunked encoding work again (WIP streaming chunked) * WIP: chunked encoding streaming * fix end of streamings * working streaming + compression * add fixes + tests * fmt + fix proxy * fix oopsies * codegen after merge * fmt + fixes * more fixes * more fixes and logs * avoid double free * check empty before pop * check empty on pop * fix copy to real when complete * remove unnecessary logs * better has_schedule_callback swap, body locked size helper, remove isEmpty from unbounded_queue pop * fix response ref, fix body_size * add deflate support, fix error throw, add more tests * codegen after merge * remove logs, add connection close test * fix macOS build * fix redirect error option * make body_size more clear * support new Reponse(response) * toString DOMWrapper objects properly instead of supporting response in Response constructor * ignore headers with no name, add more tests * oops * handle transform with fetch * add gz image stream test * remove duplicate test * fix missing chunk on macOS under pressure * oops include all OS * some fixes * compare buffers instead of sizes * refactor err.err and protect it
Diffstat (limited to 'misctools')
-rw-r--r--misctools/fetch.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/misctools/fetch.zig b/misctools/fetch.zig
index e450ab5d3..bb9e09a2a 100644
--- a/misctools/fetch.zig
+++ b/misctools/fetch.zig
@@ -187,7 +187,7 @@ pub fn main() anyerror!void {
var ctx = try default_allocator.create(HTTP.HTTPChannelContext);
ctx.* = .{
.channel = channel,
- .http = try HTTP.AsyncHTTP.init(default_allocator, args.method, args.url, args.headers, args.headers_buf, response_body_string, args.body, 0, HTTP.FetchRedirect.follow),
+ .http = try HTTP.AsyncHTTP.init(default_allocator, args.method, args.url, args.headers, args.headers_buf, response_body_string, args.body, 0, HTTP.FetchRedirect.follow,),
};
ctx.http.callback = HTTP.HTTPChannelContext.callback;
var batch = HTTPThread.Batch{};