Divy Srivastava
5e24e28318
fix(ext/node): ServerResponse getHeader() return undefined ( #21525 )
...
Matches Node's return type.
Next.js check for `if (header === undefined)`:
e02fe314dc/packages/next/src/server/base-http/node.ts (L93)
2023-12-11 11:11:59 +05:30
Divy Srivastava
e8fc7c20b7
fix(ext/node): stub ServerResponse#flushHeaders ( #21526 )
...
This commit adds a no-op flushHeaders method to the ServerResponse
object. It is a nop because the ServerResponse implementation is based
on top of the Deno server API instead of the Node `OutgoingMessage`
base.
Fixes #21509
2023-12-11 04:46:12 +00:00
Yoshiya Hinosawa
3a74fa60ca
fix(ext/node): allow null value for req.setHeader ( #21391 )
...
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-12-08 17:43:19 +09:00
Asher Gomez
d2b5254c33
chore: update std to 0.208.0 ( #21318 )
...
Re-attempt at #21284 . I was more thorough this time.
---------
Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2023-12-02 03:20:06 +01:00
Asher Gomez
616354e76c
refactor: replace deferred()
from std/async
with Promise.withResolvers()
( #21234 )
...
Closes #21041
---------
Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2023-11-22 12:11:20 +01:00
Bartek Iwańczuk
0ffcb46e0f
Revert "chore: update to std@0.207.0
( #21284 )" ( #21295 )
...
This reverts commit 20aa0796e6
.
`main` has been failing consistenly on `kv_undelivered_test` and
`serve_test` after this upgrade.
2023-11-22 04:13:56 +00:00
Asher Gomez
20aa0796e6
chore: update to std@0.207.0
( #21284 )
...
Closes #21002
2023-11-22 02:03:03 +01:00
Jacob Hummer
b2e3389a6a
fix(node/http): export globalAgent ( #21081 )
...
Fixes #21080
Fixes #18312
---------
Signed-off-by: Jacob Hummer <jcbhmr@outlook.com>
2023-11-11 10:13:30 +05:30
Gasman
837c870ff4
fix(node/http): socket.setTimeout ( #20930 )
...
Fixes #20923
2023-11-07 00:51:14 +01:00
Bartek Iwańczuk
e7abb705f9
Revert "chore: update deno_std submodule ( #20994 )" ( #21001 )
...
This reverts commit 6e2abb2b13
.
2023-10-28 01:24:37 +00:00
Bartek Iwańczuk
6e2abb2b13
chore: update deno_std submodule ( #20994 )
2023-10-27 10:34:30 -04:00
Bartek Iwańczuk
2929313652
fix(node/http): don't leak resources on destroyed request ( #20040 )
...
Closes https://github.com/denoland/deno/issues/19828
2023-08-29 12:13:58 +00:00
Bartek Iwańczuk
a48ec1d563
fix(node/http): emit error when addr in use ( #20200 )
...
Closes https://github.com/denoland/deno/issues/20186
2023-08-18 13:48:18 +02:00
Matt Mastracci
23ff0e722e
feat(ext/web): resourceForReadableStream ( #20180 )
...
Extracted from fast streams work.
This is a resource wrapper for `ReadableStream`, allowing us to treat
all `ReadableStream` instances as resources, and remove special paths in
both `fetch` and `serve`.
Performance with a ReadableStream response yields ~18% improvement:
```
return new Response(new ReadableStream({
start(controller) {
controller.enqueue(new Uint8Array([104, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100]));
controller.close();
}
})
```
This patch:
```
12:36 $ third_party/prebuilt/mac/wrk http://localhost:8080
Running 10s test @ http://localhost:8080
2 threads and 10 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 99.96us 100.03us 6.65ms 98.84%
Req/Sec 47.73k 2.43k 51.02k 89.11%
959308 requests in 10.10s, 117.10MB read
Requests/sec: 94978.71
Transfer/sec: 11.59MB
```
main:
```
Running 10s test @ http://localhost:8080
2 threads and 10 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 163.03us 685.51us 19.73ms 99.27%
Req/Sec 39.50k 3.98k 66.11k 95.52%
789582 requests in 10.10s, 82.83MB read
Requests/sec: 78182.65
Transfer/sec: 8.20MB
```
2023-08-17 07:52:37 -06:00
Bartek Iwańczuk
bd79baea5e
fix(node): add writable and readable fields to FakeSocket ( #19931 )
...
Closes https://github.com/denoland/deno/issues/19927
2023-07-25 07:17:53 +00:00
Leo Kettmeir
da709729e3
fix(node/http): add encrypted field to FakeSocket ( #19886 )
...
Fixes #19557
2023-07-21 02:18:07 +02:00
Leo Kettmeir
bf4e99cbd7
fix(node/http): call callback after request is sent ( #19871 )
...
Fixes #19762
2023-07-19 01:30:19 +02:00
Leo Kettmeir
9d5f6f67d6
fix(node/http): add destroy to FakeSocket ( #19796 )
...
Closes #19782
2023-07-11 15:08:35 +02:00
Leo Kettmeir
4cfc54931d
fix(node/http): allow callback in first argument of end call ( #19778 )
...
Closes #19762
2023-07-11 14:49:19 +02:00
Leo Kettmeir
5cda141f2d
fix(node/http): server use FakeSocket and add end method ( #19660 )
...
Fixes #19324
2023-07-10 13:48:35 +02:00
Leo Kettmeir
4db534d461
fix(node/http): add setKeepAlive to FakeSocket ( #19659 )
...
Closes #19535
2023-06-30 03:39:16 +02:00
Martin Fischer
801b9ec62d
chore: fix typos ( #19572 )
2023-06-26 09:10:27 -04:00
Leo Kettmeir
fc4e4c3e93
chore(ext/node): bring back changes to ClientRequest.onSocket ( #19509 )
...
Reverts denoland/deno#19426
2023-06-14 22:59:27 +02:00
Bartek Iwańczuk
07cbec4a82
fix(ext/node): handle 'upgrade' responses ( #19412 )
...
This commit adds support for "upgrade" events in "node:http"
"ClientRequest". Currently only "Websocket" upgrades are
handled. Thanks to this change package like "npm:puppeteer"
and "npm:discord" should work.
Closes https://github.com/denoland/deno/issues/18913
Closes https://github.com/denoland/deno/issues/17847
2023-06-13 14:11:27 +02:00
Leo Kettmeir
b4ae37a617
feat(node): HTTPS server ( #19362 )
2023-06-13 04:15:08 +02:00
Bartek Iwańczuk
c775001466
chore(ext/node): revert changes to ClientRequest.onSocket ( #19426 )
...
Partially reverts https://github.com/denoland/deno/pull/19340
because it causes hangs in some situations.
2023-06-08 20:32:26 +02:00
Leo Kettmeir
5aca8b9e5d
fix(node/http): use fake socket and proper url handling ( #19340 )
...
Fixes https://github.com/denoland/deno/issues/19349
---------
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-06-06 14:37:10 +00:00
Leo Kettmeir
6e0bf093c5
refactor: further work on node http client ( #19327 )
...
Closes https://github.com/denoland/deno/issues/18300
2023-05-31 20:06:21 +02:00
Bartek Iwańczuk
d90a75c036
fix: use proper ALPN protocols if HTTP client is HTTP/1.1 only ( #19303 )
...
Closes https://github.com/denoland/deno/issues/16923
---------
Co-authored-by: crowlkats <crowlkats@toaxl.com>
Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2023-05-29 23:05:45 +02:00
Bartek Iwańczuk
cf8b7bb530
fix(node): http.IncomingMessageForClient.complete ( #19302 )
...
Closes https://github.com/denoland/deno/issues/19238
2023-05-29 01:29:01 +02:00
Leo Kettmeir
5878258952
refactor: further work on node http client ( #19211 )
2023-05-23 03:03:10 +02:00
Bartek Iwańczuk
40bda07ff5
fix(node): add http.Server.unref() ( #19201 )
...
Closes https://github.com/denoland/deno/issues/19113
2023-05-22 01:02:10 +02:00
Leo Kettmeir
867a6d3032
refactor(node): reimplement http client ( #19122 )
...
This commit reimplements most of "node:http" client APIs using
"ext/fetch".
There is some duplicated code and two removed Node compat tests that
will be fixed in follow up PRs.
---------
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-05-17 01:20:32 +02:00
Yoshiya Hinosawa
74aee8b305
chore(ext/node): restore http_test from std ( #18747 )
2023-04-18 21:06:25 +09:00
Yoshiya Hinosawa
6efaef606a
fix(ext/node): polyfill response._implicitHeader method ( #18738 )
2023-04-18 15:20:36 +09:00