File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -274,12 +274,19 @@ fn continueRequest(cmd: anytype) !void {
274274 return cmd .sendResult (null , .{});
275275}
276276
277+ // https://chromedevtools.github.io/devtools-protocol/tot/Fetch/#type-AuthChallengeResponse
278+ const AuthChallengeResponse = enum {
279+ Default ,
280+ CancelAuth ,
281+ ProvideCredentials ,
282+ };
283+
277284fn continueWithAuth (cmd : anytype ) ! void {
278285 const bc = cmd .browser_context orelse return error .BrowserContextNotLoaded ;
279286 const params = (try cmd .params (struct {
280287 requestId : []const u8 , // "INTERCEPT-{d}"
281288 authChallengeResponse : struct {
282- response : [] const u8 ,
289+ response : AuthChallengeResponse ,
283290 username : []const u8 = "" ,
284291 password : []const u8 = "" ,
285292 },
@@ -297,7 +304,7 @@ fn continueWithAuth(cmd: anytype) !void {
297304 .response = params .authChallengeResponse .response ,
298305 });
299306
300- if (! std . mem . eql ( u8 , params .authChallengeResponse .response , " ProvideCredentials" ) ) {
307+ if (params .authChallengeResponse .response != . ProvideCredentials ) {
301308 transfer .abortAuthChallenge ();
302309 return cmd .sendResult (null , .{});
303310 }
You can’t perform that action at this time.
0 commit comments