From bb465ed1edd4c0426059d1078e247acc0368c529 Mon Sep 17 00:00:00 2001 From: Karl Seguin Date: Mon, 2 Jun 2025 17:20:28 +0800 Subject: [PATCH] Allow any 2xx status code for scripts DDG will sometimes return a 202 for its result javascript, meaning it isn't ready and the rest of the JS will then handle that case. It's weird, but there's no reason for us to abort on a 2xx code. --- src/browser/page.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/browser/page.zig b/src/browser/page.zig index ebb90528..3e05d577 100644 --- a/src/browser/page.zig +++ b/src/browser/page.zig @@ -470,7 +470,7 @@ pub const Page = struct { var header = response.header; try self.session.cookie_jar.populateFromResponse(&url.uri, &header); - if (header.status != 200) { + if (header.status < 200 or header.status > 299) { return error.BadStatusCode; }