summaryrefslogtreecommitdiff
path: root/ext
AgeCommit message (Collapse)Author
2021-09-26fix(ext/http): include port number in h2 urls (#12181)Ben Noordhuis
2021-09-26perf(fetch/headers): optimize appendHeader (#12234)Aaron O'Mullan
Use a single regex to check for `\0`, `\n`, `\r` instead of 3 `String.includes(...)` calls
2021-09-25perf(ext/fetch): Use the WebIDL conversion to DOMString rather than ↵Luis Malheiro
USVString for Response constructor (#12201)
2021-09-25fix(ext/web): FileReader error messages (#12218)Dan Rose
2021-09-25fix(http): panic when responding to a closed conn (#12216)Aaron O'Mullan
Our oneshot receiver in `HyperService::call` would unwrap and panic, the `.await` on the oneshot receiver happens when the sender is dropped. The sender is dropped in `op_http_response` because: 1. We take `ResponseSenderResource` 2. Then get `ConnResource` and early exit on failure (conn already closed) 3. The taken sender then gets dropped in this early exit before any response is sent over the channel Fallbacking to returning a dummy response to hyper seems to be a fine quickfix
2021-09-25fix(ext/http): fortify "is websocket?" check (#12179)Ben Noordhuis
Check for expected headers more rigorously and check that it's a HTTP/1.1 GET request. The logic mirrors what Deno Deploy and the tungstenite crate do. The presence of "Sec-Websocket-Version: 13" is now also enforced. I don't expect that to break anything: conforming clients already send it and tungstenite can't talk to older clients anyway. The new code is more efficient due to heap-allocating less and aligns more closely with the checks in ext/http/01_http.js now.
2021-09-25fix(ext/webidl): correctly apply [SymbolToStringTag] to interfaces (#11851)李瑞丰
Co-authored-by: Luca Casonato <hello@lcas.dev> Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2021-09-23perf(ext/fetch): skip USVString webidl conv on string constructor (#12168)Aaron O'Mullan
* perf(ext/fetch): skip USVString webidl conv on string constructor * Rename webidl convert to RequestInfo_DOMString To disambiguate and hint that it normalizes to DOMString instead of USVString since DOMString => USVString is handled by `op_url_parse` when calling `new URL(...)`
2021-09-22chore(ext/net): improve embedder friendliness (#12178)Ben Noordhuis
Default to None if UnsafelyIgnoreCertificateErrors is not present in the OpState. Embedders may not have a need for restricting outgoing TLS connections and having them hunt through the source code for the magic incantation that makes the borrow panics go away, is less user friendly.
2021-09-22chore: bump crate versions for 1.14.1 (#12172)Kitson Kelly
2021-09-21cleanup(ext/fetch): drop redundant webidl converters in fetch() (#12167)Aaron O'Mullan
Since those inputs are passed to `new Request(...)` which applies webidl converters
2021-09-21perf(ext/web): optimize EventTarget (#12166)Aaron O'Mullan
and all its subclasses including `AbortSignal` ... Instead of storing associated data in a global `WeakMap` we store them as private attributes (via a Symbol) on the object instances
2021-09-21perf(web): optimize AbortController (#12165)Aaron O'Mullan
- Use regular class constructor and symbol "private" attributes - Lazy init Set of follower signals
2021-09-21chore: bump deno_net (#12157)Satya Rohith
2021-09-20refactor(ext/net): make op_connect & op_connect_tls public (#12150)Satya Rohith
2021-09-17chore: Remove unused deps from Cargo.toml files (#12106)Squirrel
2021-09-16fix(ext/crypto): use DataError in importKey() (#12071)Divy Srivastava
2021-09-16fix(ext/crypto): don't use core.decode for encoding jwk keys (#12088)Divy Srivastava
2021-09-14chore: bump crate versions for 0.14 (#12072)David Sherret
2021-09-14feat(ext/crypto): import RSA pkcs#8 keys (#11891)Divy Srivastava
2021-09-13refactor(core): Turn the `wasm_streaming_feed` binding into ops (#11985)Andreu Botella
Async WebAssembly compilation was implemented by adding two bindings: `set_wasm_streaming_callback`, which registered a callback to be called whenever a streaming wasm compilation was started, and `wasm_streaming_feed`, which let the JS callback modify the state of the v8 wasm compiler. `set_wasm_streaming_callback` cannot currently be implemented as anything other than a binding, but `wasm_streaming_feed` does not really need to use anything specific to bindings, and could indeed be implemented as one or more ops. This PR does that, resulting in a simplification of the relevant code. There are three operations on the state of the v8 wasm compiler that `wasm_streaming_feed` allowed: feeding new bytes into the compiler, letting it know that there are no more bytes coming from the network, and aborting the compilation. This PR provides `op_wasm_streaming_feed` to feed new bytes into the compiler, and `op_wasm_streaming_abort` to abort the compilation. It doesn't provide an op to let v8 know that the response is finished, but closing the resource with `Deno.core.close()` will achieve that.
2021-09-13feat(ext/crypto): generate ECDH keys (#11870)Luca Casonato
Add support for ECDH algorithm in SubtleCrypto#generateKey.
2021-09-13feat(ext/crypto): export RSA keys as pkcs#8 (#11880)Divy Srivastava
2021-09-13fix(ext/fetch): Properly cancel upload stream when aborting (#11966)Nayeem Rahman
Co-authored-by: Luca Casonato <lucacasonato@yahoo.com>
2021-09-12fix(ext/crypto): add HkdfParams and Pkdf2Params types (#11991)Divy Srivastava
2021-09-12fix: FileReader onevent attributes don't conform to spec (#11908)Feng Yu
2021-09-11feat(ext/crypto): implement HKDF operations (#11865)Divy Srivastava
Co-authored-by: Luca Casonato <lucacasonato@yahoo.com>
2021-09-11feat(ext/crypto): verify ECDSA signatures (#11739)Divy Srivastava
2021-09-11refactor: use Deno.core.tryClose (#11980)Bartek Iwańczuk
2021-09-10perf(ext/http): optimize auto cleanup of request resource (#11978)Bert Belder
Fixes #11963.
2021-09-08fix(ext/web): Preserve stack traces for DOMExceptions (#11959)Nayeem Rahman
2021-09-08chore: add README to ext/http/ (#11958)Bartek Iwańczuk
2021-09-08chore: release deno_http 0.8.0 (#11956)Bartek Iwańczuk
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-09-08feat: add URLPattern API (#11941)Luca Casonato
This adds support for the URLPattern API. The API is added in --unstable only, as it has not yet shipped in any browser. It is targeted for shipping in Chrome 95. Spec: https://wicg.github.io/urlpattern/ Co-authored-by: crowlKats < crowlkats@toaxl.com >
2021-09-08fix(ext/http): resource leak if request body is not consumed (#11955)Bartek Iwańczuk
2021-09-07docs(ext/net): add note about listening 0.0.0.0 (#11938)Yoshiya Hinosawa
Co-authored-by: Craig Morten <cmorten@users.noreply.github.com>
2021-09-02feat(fmt): add basic JS doc formatting (#11902)David Sherret
2021-09-02chore: update dependencies (#11856)Luca Casonato
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2021-08-31feat(ext/crypto): AES key generation (#11869)Luca Casonato
Support AES-CTR, AES-CBC, AES-GCM, and AES-KW in SubtleCrypto#generateKey.
2021-08-31fix: move unstable declarations to deno.unstable (#11876)Luca Casonato
2021-08-29feat(ext/crypto): support JWK export for HMAC (#11864)Divy Srivastava
2021-08-27feat(ext/crypto): support JWK import for HMAC (#11716)Divy Srivastava
2021-08-26feat(ext/crypto): implement importKey and deriveBits for PBKDF2 (#11642)Divy Srivastava
2021-08-25feat(fetch): mTLS client certificates for fetch() (#11721)Sean Michael Wykes
This commit adds support for specifying client certificates when using fetch, by means of `Deno.createHttpClient`.
2021-08-25feat: ArrayBuffer in structured clone transfer (#11840)Luca Casonato
2021-08-25fix(ext/http): websocket upgrade header check (#11830)Dayan C. Galiazzi
2021-08-24feat(ext/crypto): implement encrypt, decrypt & generateKey for RSA-OAEP (#11654)Divy Srivastava
2021-08-24refactor(webgpu): use op interface idiomatically (#11835)Luca Casonato
2021-08-24feat(extensions/console): right align numeric columns in table (#11748)Nicolas Stucki