summaryrefslogtreecommitdiff
path: root/ext/web/internal.d.ts
AgeCommit message (Collapse)Author
2022-03-20cleanup(web, fetch): dedupe minesniff / "extract a MIME type" algorithm (#14044)Andreu Botella
Closes #14002
2022-01-20chore: update copyright year (#13434)Yoshiya Hinosawa
2021-12-10feat(cli): update to TypeScript 4.5 (#12410)Kitson Kelly
Co-authored-by: Bartek IwaƄczuk <biwanczuk@gmail.com>
2021-09-30perf(web): ~400x faster http header trimming (#12277)Aaron O'Mullan
Use a regex substring match with a first/last char fastpath instead of 2 regex replaces. Roughly ~400x faster (423ms vs 0.7ms in profiled runs)
2021-09-08fix: a `Request` whose URL is a revoked blob URL should still fetch (#11947)Andreu Botella
In the spec, a URL record has an associated "blob URL entry", which for `blob:` URLs is populated during parsing to contain a reference to the `Blob` object that backs that object URL. It is this blob URL entry that the `fetch` API uses to resolve an object URL. Therefore, since the `Request` constructor parses URL inputs, it will have an associated blob URL entry which will be used when fetching, even if the object URL has been revoked since the construction of the `Request` object. (The `Request` constructor takes the URL as a string and parses it, so the object URL must be live at the time it is called.) This PR adds a new `blobFromObjectUrl` JS function (backed by a new `op_blob_from_object_url` op) that, if the URL is a valid object URL, returns a new `Blob` object whose parts are references to the same Rust `BlobPart`s used by the original `Blob` object. It uses this function to add a new `blobUrlEntry` field to inner requests, which will be `null` or such a `Blob`, and then uses `Blob.prototype.stream()` as the response's body. As a result of this, the `blob:` URL resolution from `op_fetch` is now useless, and has been removed.
2021-08-25feat: ArrayBuffer in structured clone transfer (#11840)Luca Casonato
2021-08-11Rename extensions/ directory to ext/ (#11643)Ryan Dahl