Skip to content

Commit bb465ed

Browse files
committed
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.
1 parent c80deeb commit bb465ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/browser/page.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ pub const Page = struct {
470470
var header = response.header;
471471
try self.session.cookie_jar.populateFromResponse(&url.uri, &header);
472472

473-
if (header.status != 200) {
473+
if (header.status < 200 or header.status > 299) {
474474
return error.BadStatusCode;
475475
}
476476

0 commit comments

Comments
 (0)