@@ -280,8 +280,8 @@ fn continueWithAuth(cmd: anytype) !void {
280280 requestId : []const u8 , // "INTERCEPT-{d}"
281281 authChallengeResponse : struct {
282282 response : []const u8 ,
283- username : ? []const u8 = null ,
284- password : ? []const u8 = null ,
283+ username : []const u8 = "" ,
284+ password : []const u8 = "" ,
285285 },
286286 })) orelse return error .InvalidParams ;
287287
@@ -305,14 +305,14 @@ fn continueWithAuth(cmd: anytype) !void {
305305 // cancel the request, deinit the transfer on error.
306306 errdefer transfer .abortAuthChallenge ();
307307
308- const username = params .authChallengeResponse .username orelse "" ;
309- const password = params .authChallengeResponse .password orelse "" ;
310-
311308 // restart the request with the provided credentials.
312309 // we need to duplicate the cre
313310 const arena = transfer .arena .allocator ();
314311 transfer .updateCredentials (
315- try std .fmt .allocPrintZ (arena , "{s}:{s}" , .{ username , password }),
312+ try std .fmt .allocPrintZ (arena , "{s}:{s}" , .{
313+ params .authChallengeResponse .username ,
314+ params .authChallengeResponse .password ,
315+ }),
316316 );
317317
318318 try bc .cdp .browser .http_client .process (transfer );
0 commit comments