diff options
| author | 2023-05-11 03:55:39 -0300 | |
|---|---|---|
| committer | 2023-05-10 23:55:39 -0700 | |
| commit | f9831e1f6f9cbc29559baa15ae87a229cb91d798 (patch) | |
| tree | 51883211427624ef63531b888ab2a889c9a7d6b2 /src/cli/upgrade_command.zig | |
| parent | 8f4a5903abb20c5c874365d6ac552497ea89cd04 (diff) | |
| download | bun-f9831e1f6f9cbc29559baa15ae87a229cb91d798.tar.gz bun-f9831e1f6f9cbc29559baa15ae87a229cb91d798.tar.zst bun-f9831e1f6f9cbc29559baa15ae87a229cb91d798.zip | |
feat(fetch) add redirect: 'error' support (#2845)
* add redirect: 'error' support
* fix typo
* fix typo
* refactor FetchRedirect enum
* fix FetchRedirect
* updated
Diffstat (limited to 'src/cli/upgrade_command.zig')
| -rw-r--r-- | src/cli/upgrade_command.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cli/upgrade_command.zig b/src/cli/upgrade_command.zig index 665508833..2f06fe674 100644 --- a/src/cli/upgrade_command.zig +++ b/src/cli/upgrade_command.zig @@ -223,7 +223,7 @@ pub const UpgradeCommand = struct { // ensure very stable memory address var async_http: *HTTP.AsyncHTTP = allocator.create(HTTP.AsyncHTTP) catch unreachable; - async_http.* = HTTP.AsyncHTTP.initSync(allocator, .GET, api_url, header_entries, headers_buf, &metadata_body, "", 60 * std.time.ns_per_min, http_proxy, null); + async_http.* = HTTP.AsyncHTTP.initSync(allocator, .GET, api_url, header_entries, headers_buf, &metadata_body, "", 60 * std.time.ns_per_min, http_proxy, null, HTTP.FetchRedirect.follow); if (!silent) async_http.client.progress_node = progress; const response = try async_http.sendSync(true); @@ -454,7 +454,7 @@ pub const UpgradeCommand = struct { var zip_file_buffer = try ctx.allocator.create(MutableString); zip_file_buffer.* = try MutableString.init(ctx.allocator, @max(version.size, 1024)); - async_http.* = HTTP.AsyncHTTP.initSync(ctx.allocator, .GET, zip_url, .{}, "", zip_file_buffer, "", timeout, http_proxy, null); + async_http.* = HTTP.AsyncHTTP.initSync(ctx.allocator, .GET, zip_url, .{}, "", zip_file_buffer, "", timeout, http_proxy, null, HTTP.FetchRedirect.follow); async_http.client.timeout = timeout; async_http.client.progress_node = progress; const response = try async_http.sendSync(true); |
