Zig Version
0.12.0-dev.415+5af5d87ad (mac aarch64, windows 10, Linux 5.15.90.1-microsoft-standard-WSL2)
Steps to Reproduce and Observed Behavior
The http client is broken on UofT eduroam wifi but works fine with a hotspot from my phone.
// a.zig
const std = @import("std");
const allocator = std.testing.allocator;
const uri = std.Uri.parse("https://ziglang.org/") catch unreachable;
test {
var client: std.http.Client = .{ .allocator = allocator };
defer client.deinit();
var req = try client.request(.GET, uri, .{ .allocator = allocator }, .{});
defer req.deinit();
try req.start();
try req.wait();
try std.testing.expect(req.response.status == .ok);
}
Test [1/1] test_0... FAIL (TlsInitializationFailed)
/home/pfg/Apps/zig-linux-x86_64-0.12.0-dev.415+5af5d87ad/lib/std/os.zig:753:27: 0x3c0edf in read (test)
.CONNRESET => return error.ConnectionResetByPeer,
^
/home/pfg/Apps/zig-linux-x86_64-0.12.0-dev.415+5af5d87ad/lib/std/net.zig:1774:13: 0x40b647 in read (test)
return os.read(self.handle, buffer);
^
/home/pfg/Apps/zig-linux-x86_64-0.12.0-dev.415+5af5d87ad/lib/std/net.zig:1805:25: 0x3b81e0 in readAtLeast (test)
const amt = try s.read(buffer[index..]);
^
/home/pfg/Apps/zig-linux-x86_64-0.12.0-dev.415+5af5d87ad/lib/std/crypto/tls.zig:470:28: 0x3dcfb2 in readAtLeast__anon_12903 (test)
const actual_amt = try stream.readAtLeast(dest, request_amt);
^
/home/pfg/Apps/zig-linux-x86_64-0.12.0-dev.415+5af5d87ad/lib/std/crypto/tls.zig:479:9: 0x3dd0c4 in readAtLeastOurAmt__anon_12902 (test)
try readAtLeast(d, stream, our_amt);
^
/home/pfg/Apps/zig-linux-x86_64-0.12.0-dev.415+5af5d87ad/lib/std/crypto/tls/Client.zig:240:9: 0x38b443 in init__anon_10845 (test)
try d.readAtLeastOurAmt(stream, tls.record_header_len);
^
/home/pfg/Apps/zig-linux-x86_64-0.12.0-dev.415+5af5d87ad/lib/std/http/Client.zig:949:103: 0x2aa86e in connectUnproxied (test)
conn.data.tls_client.* = std.crypto.tls.Client.init(stream, client.ca_bundle, host) catch return error.TlsInitializationFailed;
^
/home/pfg/Apps/zig-linux-x86_64-0.12.0-dev.415+5af5d87ad/lib/std/http/Client.zig:1018:9: 0x296616 in connect (test)
return client.connectUnproxied(host, port, protocol);
^
/home/pfg/Apps/zig-linux-x86_64-0.12.0-dev.415+5af5d87ad/lib/std/http/Client.zig:1087:44: 0x28d3ac in request (test)
const conn = options.connection orelse try client.connect(host, port, protocol);
^
/home/pfg/Dev/Node/temp/generated/aa548188257c94cb525463fd900c11e5/tmp/a.zig:9:15: 0x28cd7d in test_0 (test)
var req = try client.request(.GET, uri, .{ .allocator = allocator }, .{});
^
0 passed; 0 skipped; 1 failed.
error: the following test command failed with exit code 1:
/home/pfg/.cache/zig/o/0ad311e516acf8553fce2d4d9f388c97/test
Exited with code [1]
Expected Behavior
Zig Version
0.12.0-dev.415+5af5d87ad (mac aarch64, windows 10, Linux 5.15.90.1-microsoft-standard-WSL2)
Steps to Reproduce and Observed Behavior
The http client is broken on UofT eduroam wifi but works fine with a hotspot from my phone.
Expected Behavior