summaryrefslogtreecommitdiff
path: root/ext/fetch/23_request.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/fetch/23_request.js')
-rw-r--r--ext/fetch/23_request.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/fetch/23_request.js b/ext/fetch/23_request.js
index 1372125c1..36c63db2a 100644
--- a/ext/fetch/23_request.js
+++ b/ext/fetch/23_request.js
@@ -19,6 +19,7 @@
const { mixinBody, extractBody } = window.__bootstrap.fetchBody;
const { getLocationHref } = window.__bootstrap.location;
const mimesniff = window.__bootstrap.mimesniff;
+ const { blobFromObjectUrl } = window.__bootstrap.file;
const {
headersFromHeaderList,
headerListFromHeaders,
@@ -59,6 +60,7 @@
* @property {number} redirectCount
* @property {string[]} urlList
* @property {number | null} clientRid NOTE: non standard extension for `Deno.HttpClient`.
+ * @property {Blob | null} blobUrlEntry
*/
const defaultInnerRequest = {
@@ -81,11 +83,16 @@
* @returns
*/
function newInnerRequest(method, url, headerList = [], body = null) {
+ let blobUrlEntry = null;
+ if (url.startsWith("blob:")) {
+ blobUrlEntry = blobFromObjectUrl(url);
+ }
return {
method: method,
headerList,
body,
urlList: [url],
+ blobUrlEntry,
...defaultInnerRequest,
};
}
@@ -118,6 +125,7 @@
redirectCount: request.redirectCount,
urlList: request.urlList,
clientRid: request.clientRid,
+ blobUrlEntry: request.blobUrlEntry,
};
}