Age | Commit message (Collapse) | Author |
|
|
|
(#12901)
Fetching of local files, added in #12545, returns a response with no
headers, including the `Content-Type` header. This currently makes it
not work with the WebAssembly streaming APIs, which require the response
to have a content type of `application/wasm`.
Since the only way to obtain a `Response` object with a non-empty `url`
field is via `fetch()`, this change changes the content type requirement
to only apply to responses whose url has the `file:` scheme.
|
|
|
|
|
|
This reverts commit 49ec3d10ad90851f4d28274a3f0fe96c642204ac.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Fixes: #12193
Fixes: #12251
Closes: #12714
|
|
This allows resources to be "streams" by implementing read/write/shutdown. These streams are implicit since their nature (read/write/duplex) isn't known until called, but we could easily add another method to explicitly tag resources as streams.
`op_read/op_write/op_shutdown` are now builtin ops provided by `deno_core`
Note: this current implementation is simple & straightforward but it results in an additional alloc per read/write call
Closes #12556
|
|
|
|
This commit changes `fetch` to set `content-length: 0` on POST and PUT
requests with no body.
|
|
(#12704)
This reverts commit 5b1e537446454f6332de44adbeb6a15ff072c2fa.
|
|
This makes it possible for implementers to cherry-pick which ops they
want to use.
|
|
|
|
Fixes: #12193
|
|
|
|
|
|
|
|
Warn on await_holding_refcell_ref clippy rule to avoid this in the future.
Fixes #12453
|
|
This commit introduces support for BYOB readers in the WHATWG Streams API implementation.
|
|
|
|
Closes #11925
Closes #2150
Co-authored-by: Bert Belder <bertbelder@gmail.com>
|
|
Rename `op_create_http_client` to `op_fetch_custom_client` to follow prefix/namespaced convention
|
|
|
|
|
|
This commit stabilizes `Deno.startTls` and removes `certFile` from the
`StartTlsOptions`.
|
|
statement (#12583)
|
|
|
|
The Web IDL conversion to `BufferSource` and similar types shouldn't
check whether the buffer is detached.
In the case of `TextDecoder`, our implementation would still throw after
the Web IDL conversions because we're creating a new `Uint8Array` from
the buffer source's buffer, which throws if it's detached. This change
also fixes this bug.
|
|
The implementation of `TextDecoder` had a bug where it was copying the
input data in every case. This change removes that copy in
non-`SharedArrayBuffer` cases.
Since passing a shared buffer source to Rust would fail, this copy of
the input data was making `TextDecoder` work in cases where the input
is shared. In order to avoid a breaking change, the copy is retained in
those cases.
|
|
Closes #11882
BREAKING CHANGE: Previously when `--location` was set, the unique storage key was derived from the the URL of the location instead of just the origin. This change correctly uses just the origin. This may cause previously persisted storage to change its key and data to not be available with the same location as before.
|
|
Co-authored-by: Aaron O'Mullan <aaron.omullan@gmail.com>
|
|
Fork is no longer necessary since https://github.com/tov/libffi-rs/pull/33
landed.
|
|
A `handshake()` method was added that returns when the TLS handshake is
complete. The `TlsListener` and `TlsConn` interfaces were added to
accomodate this new method.
Closes: #11759.
|
|
Using serde_v8's StringOrBuffer
|
|
`fetch()` and client-side websocket used to support HTTP/2, but this
regressed in #11491. This patch reenables it by explicitly adding `h2`
and `http/1.1` to the list of ALPN protocols on the HTTP and websocket
clients.
|
|
|
|
Co-authored-by: Feng Yu <F3n67u@outlook.com>
|
|
A bug was fixed that could cause a hang when a method was
called on a TlsConn object that had thrown an exception earlier.
Additionally, a bug was fixed that caused TlsConn.write() to not
completely flush large buffers (>64kB) to the socket.
The public `TlsConn.handshake()` API is scheduled for inclusion in the
next minor release. See https://github.com/denoland/deno/pull/12467.
|
|
|
|
|
|
|
|
Currently all async ops are polled lazily, which means that op
initialization code is postponed until control is yielded to the event
loop. This has some weird consequences, e.g.
```js
let listener = Deno.listen(...);
let conn_promise = listener.accept();
listener.close();
// `BadResource` is thrown. A reasonable error would be `Interrupted`.
let conn = await conn_promise;
```
JavaScript promises are expected to be eagerly evaluated. This patch
makes ops actually do that.
|
|
|
|
|