fix: redirects with partials (#2053)

This commit is contained in:
Marvin Hagemeister
2023-11-21 11:35:08 +01:00
committed by GitHub
parent ba3fa2c895
commit 27adeb7b14
7 changed files with 79 additions and 1 deletions
+2 -1
View File
@@ -550,7 +550,8 @@ function _walkInner(
const partialErrorMessage = `Unable to process partial response.`;
async function fetchPartials(url: URL, init?: RequestInit) {
async function fetchPartials(url: URL, init: RequestInit = {}) {
init.redirect = "follow";
url.searchParams.set(PARTIAL_SEARCH_PARAM, "true");
const res = await fetch(url, init);
await applyPartials(res);