cions
ebfd3c3d7c
fix: android build ( #30360 )
...
ci / pre-build (push) Waiting to run
ci / test debug linux-aarch64 (push) Blocked by required conditions
ci / test release linux-aarch64 (push) Blocked by required conditions
ci / test debug macos-aarch64 (push) Blocked by required conditions
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / bench release linux-x86_64 (push) Blocked by required conditions
ci / lint debug linux-x86_64 (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / lint debug windows-x86_64 (push) Blocked by required conditions
ci / test debug linux-x86_64 (push) Blocked by required conditions
ci / test release linux-x86_64 (push) Blocked by required conditions
ci / test debug macos-x86_64 (push) Blocked by required conditions
ci / test release macos-x86_64 (push) Blocked by required conditions
ci / test debug windows-x86_64 (push) Blocked by required conditions
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / build libs (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
Fix build error on Android.
Patches from https://github.com/cions/termux-deno
2025-08-12 15:47:18 +02:00
林炳权
68297b5f10
chore: Rust 1.89.0 ( #30364 )
...
ci / pre-build (push) Waiting to run
ci / test debug linux-aarch64 (push) Blocked by required conditions
ci / test release linux-aarch64 (push) Blocked by required conditions
ci / test debug macos-aarch64 (push) Blocked by required conditions
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / bench release linux-x86_64 (push) Blocked by required conditions
ci / lint debug linux-x86_64 (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / lint debug windows-x86_64 (push) Blocked by required conditions
ci / test debug linux-x86_64 (push) Blocked by required conditions
ci / test release linux-x86_64 (push) Blocked by required conditions
ci / test debug macos-x86_64 (push) Blocked by required conditions
ci / test release macos-x86_64 (push) Blocked by required conditions
ci / test debug windows-x86_64 (push) Blocked by required conditions
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / build libs (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
Related PR: https://github.com/denoland/deno/pull/30354
2025-08-09 11:11:48 +00:00
snek
8551e18d72
fix(http): catch more tunnel close errors ( #30236 )
...
Handles more error cases when tunnels close. this logic got super nasty to do as nested if statements, so i added recursion >:)
2025-07-29 23:37:04 +02:00
Divy Srivastava
8a5f0928cd
chore: upgrade to rustls_tokio_stream 0.7 ( #29898 )
...
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2025-07-10 20:27:04 +02:00
snek
88f16236b1
fix: new signal handling ( #30029 )
...
ci / pre-build (push) Waiting to run
ci / test debug linux-aarch64 (push) Blocked by required conditions
ci / test release linux-aarch64 (push) Blocked by required conditions
ci / test debug macos-aarch64 (push) Blocked by required conditions
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / bench release linux-x86_64 (push) Blocked by required conditions
ci / lint debug linux-x86_64 (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / lint debug windows-x86_64 (push) Blocked by required conditions
ci / test debug linux-x86_64 (push) Blocked by required conditions
ci / test release linux-x86_64 (push) Blocked by required conditions
ci / test debug macos-x86_64 (push) Blocked by required conditions
ci / test release macos-x86_64 (push) Blocked by required conditions
ci / test debug windows-x86_64 (push) Blocked by required conditions
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
ci / build libs (push) Blocked by required conditions
Set up a new centralized signal handling path, which emulates the
default unless something is explicitly registered to prevent it.
Fixes: https://github.com/denoland/deno/issues/29590
---------
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2025-07-09 09:01:27 +02:00
Leo Kettmeir
b59576cc0f
feat(unstable): tunnelling ( #30022 )
...
Co-authored-by: snek <snek@deno.com>
2025-07-08 02:44:50 +02:00
Nathan Whitaker
9379a74e08
chore: update to edition 2024 ( #29923 )
ci / publish canary (push) Blocked by required conditions
ci / pre-build (push) Waiting to run
ci / test debug linux-aarch64 (push) Blocked by required conditions
ci / test release linux-aarch64 (push) Blocked by required conditions
ci / test debug macos-aarch64 (push) Blocked by required conditions
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / bench release linux-x86_64 (push) Blocked by required conditions
ci / lint debug linux-x86_64 (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / lint debug windows-x86_64 (push) Blocked by required conditions
ci / test debug linux-x86_64 (push) Blocked by required conditions
ci / test release linux-x86_64 (push) Blocked by required conditions
ci / test debug macos-x86_64 (push) Blocked by required conditions
ci / test release macos-x86_64 (push) Blocked by required conditions
ci / test debug windows-x86_64 (push) Blocked by required conditions
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / build libs (push) Blocked by required conditions
2025-07-02 17:59:39 -07:00
Volker Schlecht
b9b49090b0
fix: support virtio vsock only on systems on which it is available (remainder) ( #29709 )
...
See https://github.com/denoland/deno/issues/29268 for the related
discussion. @devsnek @marvinhagemeister
These are two patches I missed with the initial PR
(https://github.com/denoland/deno/pull/29354 )
2025-06-11 23:00:07 +02:00
Bartek Iwańczuk
be5396ebf4
feat: Add support for DENO_TRUST_PROXY_HEADERS env var ( #29296 )
...
ci / pre-build (push) Waiting to run
ci / test debug linux-aarch64 (push) Blocked by required conditions
ci / test release linux-aarch64 (push) Blocked by required conditions
ci / test debug macos-aarch64 (push) Blocked by required conditions
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / bench release linux-x86_64 (push) Blocked by required conditions
ci / lint debug linux-x86_64 (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / lint debug windows-x86_64 (push) Blocked by required conditions
ci / test debug linux-x86_64 (push) Blocked by required conditions
ci / test release linux-x86_64 (push) Blocked by required conditions
ci / test debug macos-x86_64 (push) Blocked by required conditions
ci / test release macos-x86_64 (push) Blocked by required conditions
ci / test debug windows-x86_64 (push) Blocked by required conditions
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / build wasm32 (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
If this env var is specified, then `x-deno-client-address` headers are
removed from the served HTTP traffic.
2025-05-15 13:05:50 +02:00
snek
d843a93e65
fix: fix bugs with rendering of authority in serve urls ( #29009 )
...
- preserve authority from protocol
- reject some invalid combinations of request lines (e.g. `GET *`)
- modify rendering of OPTIONS and CONNECT so that they don't cause `new
URL` to raise.
2025-04-23 11:23:15 +02:00
snek
9da231dc7a
feat: support linux vsock ( #28725 )
...
impl support for vsock
https://man7.org/linux/man-pages/man7/vsock.7.html
2025-04-11 07:35:05 +02:00
Divy Srivastava
48ccb67131
chore(ext/http): add "legacy_abort" runtime flag ( #28371 )
...
Deno.serve `Request` abort signals are aborted by default even when it
is finished successfully. This PR gates this behavior behind the
"legacy_abort" which is the default right now.
Turning the `no_legacy_abort` runtime option on is a **breaking change**
and will only abort request signals when there is a failure, thereby
cannot be used to determine if the request finished. This aligns with
`fetch` API.
Ref https://github.com/denoland/deno/issues/27005
2025-03-22 08:13:57 +05:30
Paolo Barbolini
1516e3ef58
refactor: reduce dependency on futures
crate ( #28515 )
...
Over time many `futures` APIs have been stabilized in `std`. This
migrates most uses to the std variants.
2025-03-17 14:14:19 +00:00
Leo Kettmeir
bf79971c95
feat(http): add otel metrics ( #28034 )
...
Signed-off-by: Leo Kettmeir <crowlkats@toaxl.com>
Co-authored-by: Luca Casonato <hello@lcas.dev>
2025-02-18 14:19:52 -08:00
Leo Kettmeir
ea30e188a8
refactor: update deno_core for error refactor ( #26867 )
...
Closes #26171
---------
Co-authored-by: David Sherret <dsherret@gmail.com>
2025-01-08 14:52:32 -08:00
Kenta Moriuchi
8fb073d7b4
chore: Happy New Year 2025 ( #27509 )
2024-12-31 19:12:39 +00:00
David Sherret
ac7b33a340
chore: cargo fmt - turn on group_imports=StdExternalCrate ( #26646 )
2024-12-31 12:13:39 -05:00
Yusuke Tanaka
9f26ca4509
feat(ext/http): Make http server parameters configurable ( #26785 )
...
This commit makes http server parameters configurable on the extension
initialization via two callbacks users can provide.
The main motivation behind this change is to allow `deno_http` users to
tune the HTTP/2 server to suit their needs, although Deno CLI users will
not benefit from it as no JavaScript interface is exposed to set these
parameters currently.
It is up to users whether to provide hook functions. If not provided,
the default configuration from hyper crate will be used.
2024-11-18 17:46:24 -08:00
Satya Rohith
90236d67c5
fix(ext/http): prefer brotli for accept-encoding: gzip, deflate, br, zstd
( #26814 )
...
Closes https://github.com/denoland/deno/issues/26813
2024-11-12 12:10:41 +05:30
Divy Srivastava
b482a50299
feat(ext/http): abort event when request is cancelled ( #26781 )
...
```js
Deno.serve(async (req) => {
const { promise, resolve } = Promise.withResolvers<void>();
req.signal.addEventListener("abort", () => {
resolve();
});
await promise;
return new Response("Ok");
});
```
2024-11-08 18:46:11 +05:30
Divy Srivastava
b9262130fe
feat(ext/http): abort signal when request is cancelled ( #26761 )
...
Closes https://github.com/denoland/deno/issues/21653
2024-11-07 17:12:13 +05:30
Leo Kettmeir
2c3900370a
refactor(ext/http): use concrete error types ( #26377 )
2024-10-18 15:57:12 -07:00
Leo Kettmeir
d047cab14b
refactor(ext/websocket): use concrete error type ( #26226 )
2024-10-18 19:30:46 +00:00
David Sherret
661882f10d
perf(http): make heap allocation for path conditional ( #26289 )
...
Code:
```js
Deno.serve({ port: 8085 }, request => {
return new Response(request.url);
});
```
Before:
```
% wrk -d60s http://localhost:8085/path/testing\?testing=5
Running 1m test @ http://localhost:8085/path/testing?testing=5
2 threads and 10 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 56.01us 18.34us 3.28ms 93.84%
Req/Sec 81.80k 3.13k 88.26k 90.77%
9783713 requests in 1.00m, 1.67GB read
Requests/sec: 162789.89
Transfer/sec: 28.41MB
```
After:
```
% wrk -d60s http://localhost:8085/path/testing\?testing=5
Running 1m test @ http://localhost:8085/path/testing?testing=5
2 threads and 10 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 55.44us 15.20us 2.42ms 90.41%
Req/Sec 82.71k 2.92k 88.10k 89.93%
9892916 requests in 1.00m, 1.69GB read
Requests/sec: 164607.06
Transfer/sec: 28.73MB
```
2024-10-16 00:43:20 -04:00
David Sherret
7f3747f2ef
perf(http): avoid clone getting request method and url ( #26250 )
2024-10-14 23:25:47 -04:00
Asher Gomez
8476bbff9a
feat: stabilize Deno.createHttpClient()
( #25569 )
...
Closes #25518
2024-09-12 10:46:48 +10:00
Bartek Iwańczuk
777e7eaa81
feat: Upgrade V8 to 12.9 ( #25138 )
2024-08-21 22:33:21 +00:00
Matt Mastracci
eed2598e6c
feat(ext/http): Implement request.signal for Deno.serve ( #23425 )
...
When the response has been successfully send, we abort the
`Request.signal` property to indicate that all resources associated with
this transaction may be torn down.
2024-04-24 14:03:37 -04:00
林炳权
9304126be5
chore: update to Rust 1.77.2 ( #23262 )
...
update to Rust 1.77.2
---------
Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2024-04-10 22:08:23 +00:00
cui fliter
d4b3b39cc0
chore: fix typos ( #22677 )
2024-03-04 14:28:57 +00:00
Matt Mastracci
c66f7b6d8d
fix(ext/http): smarter handling of Accept-Encoding ( #22130 )
2024-01-26 15:33:55 +00:00
Bartek Iwańczuk
cd43d2b877
chore: upgrade deno_core to 0.244.0 ( #21859 )
2024-01-09 17:25:10 +01:00
David Sherret
7e72f3af61
chore: update copyright to 2024 ( #21753 )
2024-01-01 19:58:21 +00:00
Bartek Iwańczuk
c2414db1f6
refactor: simplify hyper, http, h2 deps ( #21715 )
...
Main change is that:
- "hyper" has been renamed to "hyper_v014" to signal that it's legacy
- "hyper1" has been renamed to "hyper" and should be the default
2023-12-27 11:59:57 -05:00
Bartek Iwańczuk
f86456fc26
chore: update ext/http to hyper 1.0.1 and http 1.0 ( #21588 )
...
Closes https://github.com/denoland/deno/issues/21583 .
2023-12-22 01:54:28 +01:00
Bartek Iwańczuk
c481ff7d81
refactor(ext/http): fork fly_accept_encodings crate ( #21586 )
...
Blocks update to Hyper 1.0. It's a really small library, no need to pull
it as a dependency.
Blocker for #21583
2023-12-14 18:43:33 +00:00
Bartek Iwańczuk
a931a47511
feat: stabilize Deno.HttpServer.shutdown and Unix socket support ( #21463 )
...
This commit stabilizes "Deno.HttpServer.shutdown" API as well as
Unix socket support in "Deno.serve" API.
---------
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2023-12-06 23:43:01 +00:00
Matt Mastracci
68a0877f8d
fix(ext/http): avoid lockup in graceful shutdown ( #21253 )
...
Follow-up to #20822 . cc @lrowe
The `httpServerExplicitResourceManagement` tests were randomly failing
on CI because of a race.
The `drain` waker was missing wakeup events if the listeners shut down
after the last HTTP response finished. If we lost the race (rare), the
server Rc would be dropped and we wouldn't poll it again.
This replaces the drain waker system with a signalling Rc that always
resolves when the refcount is about to become 1.
Fix verified by running serve tests in a loop:
```
for i in {0..100}; do cargo run --features=__http_tracing -- test
-A --unstable '/Users/matt/Documents/github/deno/deno/cli/tests/unit/ser
ve_test.ts' --filter httpServerExplicitResourceManagement; done;
```
2023-11-23 16:39:17 +00:00
Matt Mastracci
679b7bb8fa
fix(ext/http): fix crash in dropped Deno.serve requests ( #21252 )
...
Fixes #21250
We were attempting to recycle dropped resource responses too early.
2023-11-18 13:16:53 -07:00
Matt Mastracci
6b42cecc06
feat(ext/net): use rustls_tokio_stream ( #21205 )
...
Fixes #21121 and #19498
Migrates fully to rustls_tokio_stream. We no longer need to maintain our
own TlsStream implementation to properly support duplex.
This should fix a number of errors with TLS and websockets, HTTP and
"other" places where it's failing.
2023-11-15 16:12:46 -07:00
Laurence Rowe
e5819777c3
refactor(ext/http): Use HttpRecord as response body to track until body completion ( #20822 )
...
Use HttpRecord as response body so requests can be tracked all the way
to response body completion.
This allows Request properties to be accessed while the response body is
streaming.
Graceful shutdown now awaits a future instead of async spinning waiting
for requests to finish.
On the minimal benchmark this refactor improves performance an
additional 2% over pooling alone for a net 3% increase over the previous
deno main branch.
Builds upon https://github.com/denoland/deno/pull/20809 and
https://github.com/denoland/deno/pull/20770 .
---------
Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2023-11-13 19:17:31 +00:00
Laurence Rowe
25950baed3
perf(ext/http): Object pooling for HttpRecord and HeaderMap ( #20809 )
...
Reuse existing existing allocations for HttpRecord and response
HeaderMap where possible.
At request end used allocations are returned to the pool and the pool
and the pool sized to 1/8th the current number of inflight requests.
For http1 hyper will reuse the response HeaderMap for the following
request on the connection.
Builds upon https://github.com/denoland/deno/pull/20770
---------
Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2023-11-13 10:32:34 -07:00
Laurence Rowe
542314a0be
refactor(ext/http): refer to HttpRecord directly using v8::External ( #20770 )
...
Makes the JavaScript Request use a v8:External opaque pointer to
directly refer to the Rust HttpRecord.
The HttpRecord is now reference counted. To avoid leaks the strong count
is checked at request completion.
Performance seems unchanged on the minimal benchmark. 118614 req/s this
branch vs 118564 req/s on main, but variance between runs on my laptop
is pretty high.
---------
Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2023-11-13 07:04:49 -07:00
Bartek Iwańczuk
093b3eee58
chore: update deno_core and port all remaining ops to op2
( #20954 )
...
Signed-off-by: Matt Mastracci <matthew@mastracci.com>
Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2023-10-25 13:43:38 +02:00
Bartek Iwańczuk
c464cd7073
refactor: FeatureChecker integration in ext/ crates ( #20797 )
...
Towards https://github.com/denoland/deno/issues/20779 .
2023-10-12 15:55:50 +00:00
Bartek Iwańczuk
a5568066b3
refactor: use deno_core::FeatureChecker for unstable checks ( #20765 )
2023-10-04 21:42:17 +02:00
Laurence Rowe
8fcea5966c
refactor(ext/http): use scopeguard defer to handle async drop ( #20652 )
...
Use the [scopeguard](https://docs.rs/scopeguard/ ) defer macro to run
cleanup code for `new_slab_future`.
This means it can be a single async function, avoiding the need to
create a struct and implement `PinnedDrop`
Async cleanup in Rust is awkward because async functions may be
cancelled at any await point when their Future is dropped.
The scopeguard approach comes from the following articles:
* [How to think about `async`/`await` in
Rust](http://cliffle.com/blog/async-inversion/ )
* [Async Cancellation
I](https://blog.yoshuawuyts.com/async-cancellation-1/ ) (Reddit
[discussion](https://www.reddit.com/r/rust/comments/qrhg39/blog_post_async_cancellation/ ))
2023-09-26 05:42:48 -06:00
Matt Mastracci
a27ee8f368
fix(ext/http): ensure that resources are closed when request is cancelled ( #20641 )
...
Builds on top of #20622 to fix #10854
2023-09-25 17:23:55 +02:00
Bartek Iwańczuk
b2abae4771
refactor: rewrite more ops to op2 ( #20666 )
2023-09-24 22:07:22 +00:00
Bartek Iwańczuk
68851d6f37
refactor: rewrite ops to op2 macro ( #20628 )
...
Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2023-09-23 19:33:31 +00:00