diff options
-rw-r--r-- | ext/fetch/23_request.js | 7 | ||||
-rw-r--r-- | ext/http/01_http.js | 1 |
2 files changed, 5 insertions, 3 deletions
diff --git a/ext/fetch/23_request.js b/ext/fetch/23_request.js index bf1683b35..845e47877 100644 --- a/ext/fetch/23_request.js +++ b/ext/fetch/23_request.js @@ -67,11 +67,12 @@ * @param {string} url * @param {[string, string][]} headerList * @param {typeof __window.bootstrap.fetchBody.InnerBody} body + * @param {boolean} maybeBlob * @returns */ - function newInnerRequest(method, url, headerList = [], body = null) { + function newInnerRequest(method, url, headerList, body, maybeBlob) { let blobUrlEntry = null; - if (url.startsWith("blob:")) { + if (maybeBlob && url.startsWith("blob:")) { blobUrlEntry = blobFromObjectUrl(url); } return { @@ -236,7 +237,7 @@ // 5. if (typeof input === "string") { const parsedURL = new URL(input, baseURL); - request = newInnerRequest("GET", parsedURL.href, [], null); + request = newInnerRequest("GET", parsedURL.href, [], null, true); } else { // 6. if (!(input instanceof Request)) throw new TypeError("Unreachable"); request = input[_request]; diff --git a/ext/http/01_http.js b/ext/http/01_http.js index 723293689..2681edff8 100644 --- a/ext/http/01_http.js +++ b/ext/http/01_http.js @@ -103,6 +103,7 @@ url, headersList, body !== null ? new InnerBody(body) : null, + false, ); const signal = abortSignal.newSignal(); const request = fromInnerRequest(innerRequest, signal, "immutable"); |