zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit dcddbcaa604d9228caddea7b2cd2668bf392149f (tree)
parent b72a02c592ba7a7b201b5a32af329b3730b148e3
Author: Tadej Gašparovič <tadej@duplex.si>
Date:   Sun, 31 Aug 2025 15:40:21 +0200

Fix regression: std.http.Client basic authorization sending user:user instead of user:password when passed in URI

Diffstat:
Mlib/std/http/Client.zig | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/std/http/Client.zig b/lib/std/http/Client.zig @@ -1375,7 +1375,7 @@ pub const basic_authorization = struct { var buf: [max_user_len + 1 + max_password_len]u8 = undefined; var w: Writer = .fixed(&buf); const user: Uri.Component = uri.user orelse .empty; - const password: Uri.Component = uri.user orelse .empty; + const password: Uri.Component = uri.password orelse .empty; user.formatUser(&w) catch unreachable; w.writeByte(':') catch unreachable; password.formatPassword(&w) catch unreachable;