From 5214958c0e7de61636d5313982bd8ff9ff09f13b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tadej=20Ga=C5=A1parovi=C4=8D?= Date: Sun, 31 Aug 2025 15:40:21 +0200 Subject: [PATCH] Fix regression: std.http.Client basic authorization sending user:user instead of user:password when passed in URI --- lib/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 index b6a1483c1d9d..37573917359e 100644 --- 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;