File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -578,6 +578,16 @@ fn Client(comptime S: type) type {
578578 return self .send (self .server .json_version_response , false );
579579 }
580580
581+ const json_list_response =
582+ "HTTP/1.1 200 OK\r \n " ++
583+ "Content-Length: 47\r \n " ++
584+ "Content-Type: application/json; charset=UTF-8\r \n \r \n " ++
585+ "[{\" id\" :\" 1\" ,\" type\" :\" page\" ,\" url\" :\" abount:blank\" }]" ;
586+
587+ if (std .mem .eql (u8 , url , "/json/list" )) {
588+ return self .send (json_list_response , false );
589+ }
590+
581591 return error .NotFound ;
582592 }
583593
@@ -1123,12 +1133,12 @@ pub fn run(
11231133
11241134// Utils
11251135// --------
1126-
1136+ //
11271137fn buildJSONVersionResponse (
11281138 allocator : Allocator ,
11291139 address : net.Address ,
11301140) ! []const u8 {
1131- const body_format = "{{\" webSocketDebuggerUrl\" : \" ws://{}/\" }}" ;
1141+ const body_format = "{{\" Browser \" : \" Chrome/132.0.6834.110 \" , \" WebKit-Version \" : \" 537.36 (@df453a35f099772fdb954e33551388add2ca3cde) \" , \" webSocketDebuggerUrl\" : \" ws://{}/\" }}" ;
11321142 const body_len = std .fmt .count (body_format , .{address });
11331143
11341144 const response_format =
You can’t perform that action at this time.
0 commit comments