Yoshiya Hinosawa
50e66dacfa
fmt
2024-10-17 12:23:04 +09:00
Yoshiya Hinosawa
4915f342b0
remove debugs
2024-10-17 12:15:27 +09:00
Yoshiya Hinosawa
16be0202ca
Merge branch 'main' into support_create_connection
...
Signed-off-by: Yoshiya Hinosawa <stibium121@gmail.com>
2024-10-17 12:00:57 +09:00
Nathan Whitaker
458d6278d2
fix(node/http): normalize header names in ServerResponse
( #26339 )
...
Fixes https://github.com/denoland/deno/issues/26115 .
We weren't normalizing the headers to lower case, so code that attempted
to delete the `Content-Length` header (but used a different case) wasn't
actually removing the header.
2024-10-17 00:42:15 +00:00
Satya Rohith
be6a1baa06
Merge remote-tracking branch 'upstream/main' into support_create_connection
2024-10-17 01:32:10 +05:30
Yoshiya Hinosawa
d59599fc18
fix(ext/node): fix dns.lookup result ordering ( #26264 )
...
partially unblocks #25470
This PR aligns the resolution of `localhost` hostname to Node.js
behavior.
In Node.js `dns.lookup("localhost", (_, addr) => console.log(addr))`
prints ipv6 address `::1`, but it prints ipv4 address `127.0.0.1` in
Deno. That difference causes some errors in the work of enabling
`createConnection` option in `http.request` (#25470 ). This PR fixes the
issue by aligning `dns.lookup` behavior to Node.js.
This PR also changes the following behaviors (resolving TODOs):
- `http.createServer` now listens on ipv6 address `[::]` by default on
linux/mac
- `net.createServer` now listens on ipv6 address `[::]` by default on
linux/mac
These changes are also alignments to Node.js behaviors.
2024-10-16 20:58:44 +09:00
Satya Rohith
881fe46d3f
fix double request initiation
2024-10-15 16:46:09 +05:30
Satya Rohith
d19c5a73e1
wip
2024-10-14 19:28:59 +05:30
Satya Rohith
3c9ac413c7
https post request work
2024-10-14 19:28:53 +05:30
Yoshiya Hinosawa
e95d7dfe37
fix lint
2024-10-03 22:32:05 +09:00
Yoshiya Hinosawa
7471848dc4
refactor: dedupe op_node_http_request_with_conn and op_node_http_request_with_tls_conn
2024-10-03 21:42:51 +09:00
Yoshiya Hinosawa
a372ed518b
refactor: use _encrypted field
2024-10-03 19:04:45 +09:00
Yoshiya Hinosawa
6b6669f0df
chore: fix lint
2024-10-03 18:42:33 +09:00
Satya Rohith
007b5265b8
fix: support https requests
...
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2024-10-03 11:28:23 +05:30
Yoshiya Hinosawa
cf6ae67a31
refactor: reduce duplication
2024-10-03 12:05:04 +09:00
Yoshiya Hinosawa
e60e727e5e
enable another test case
2024-10-02 00:40:56 +09:00
Yoshiya Hinosawa
0c4f78619f
fix lint errors
2024-09-26 19:37:12 +09:00
Satya Rohith
2c60a4352d
wip: abort request when destroy() is invoked
...
Yoshiya Hinosawa <stibium121@gmail.com>
2024-09-26 14:20:48 +05:30
Yoshiya Hinosawa
122cefaed4
fix lint errors
2024-09-26 13:54:09 +09:00
Yoshiya Hinosawa
6301b5831c
update test cases
2024-09-26 13:24:55 +09:00
Yoshiya Hinosawa
2f9cdaa67d
fixes
2024-09-26 13:05:21 +09:00
Yoshiya Hinosawa
9c1b39ba2d
clean up debug logs
2024-09-26 12:45:33 +09:00
Yoshiya Hinosawa
be8c90de6f
fmt
2024-09-24 20:28:50 +09:00
Satya Rohith
65eb113359
wip
2024-09-24 11:40:18 +05:30
Satya Rohith
e98525c0a0
get get_data.js working
2024-09-24 11:01:56 +05:30
Satya Rohith
32614733bf
wip
2024-09-24 11:01:56 +05:30
Satya Rohith
f9c1219f7c
wip
2024-09-24 11:01:56 +05:30
Satya Rohith
95ad0faddb
wip
2024-09-24 11:01:56 +05:30
Satya Rohith
d95db75de5
fix ids
2024-09-24 11:01:56 +05:30
Satya Rohith
29fe1768a8
introduce more ops to wait for connection ready
2024-09-24 11:01:56 +05:30
Satya Rohith
821d5a5653
flush buffer once socket is ready
2024-09-24 11:01:56 +05:30
Satya Rohith
ae5d72a870
feat: use buffer, introduce flushHeaders, flushBody
2024-09-24 11:01:55 +05:30
Satya Rohith
a3363a9a6a
feat(ext/node): set on("socket") listener for write
2024-09-24 11:01:55 +05:30
Satya Rohith
2c576e8d78
feat(ext/node): fallback to net.createConnection in client
2024-09-24 11:01:55 +05:30
Satya Rohith
c883a72f27
chore(ext/node): remove old ops
2024-09-24 11:01:55 +05:30
Satya Rohith
568cd787cc
feat: op_node_http_request_with_conn
2024-09-24 11:01:55 +05:30
Bartek Iwańczuk
f794781ffb
feat(ext/node): expose ES modules for _ modules ( #25588 )
...
Exposes following modules:
- `"node:_http_agent"`
- `"node:_http_common"`
- `"node:_http_outgoing"`
- `"node:_http_server"`
- `"node:_stream_duplex"`
- `"node:_stream_passthrough"`
- `"node:_stream_readable"`
- `"node:_stream_transform"`
- `"node:_stream_writable"`
- `"node:_tls_common"`
- `"node:_tls_wrap"`
2024-09-12 00:52:08 +00:00
Satya Rohith
e920835417
fix(ext/node): pass content-disposition header as string instead of bytes ( #25128 )
...
Closes https://github.com/denoland/deno/issues/25117
2024-08-21 10:13:17 +00:00
David Sherret
a7c002ae63
chore: enable no-console dlint rule ( #25113 )
2024-08-20 15:14:37 -04:00
Marvin Hagemeister
558d2a098b
fix(node/http): wrong req.url
value ( #25081 )
...
This PR addresses a regression introduced in
https://github.com/denoland/deno/pull/25021 that would cause the
`req.url` parameter in Node's http server to always be a single
character instead of the expected value. The regression was caused by
effectively calling `.indexOf()` on an empty string and thus passing the
wrong index for slicing.
```js
"".indexOf("/") // -> -1
request.url.slice(-1) // effectively only giving us the last character
```
Fixes https://github.com/denoland/deno/issues/25080
2024-08-18 15:37:39 +00:00
snek
fd1f8234f4
fix: dd-trace http message compat ( #25021 )
...
make this http incoming constructor match with node, and also handle
arbitrary duplex inputs
2024-08-14 09:19:59 +02:00
Luca Casonato
56e8ed5eb1
fix(ext/node): don't concat set-cookie in ServerResponse.appendHeader ( #25000 )
...
Follow-on to
https://github.com/denoland/deno/pull/24216/files#r1642188672
2024-08-12 12:01:37 +02:00
Satya Rohith
65224786d2
fix(ext/node): client closing streaming request shouldn't terminate http server ( #24946 )
...
Closes https://github.com/denoland/deno/issues/22820
2024-08-08 10:22:58 +00:00
Bartek Iwańczuk
c6ecf70a09
refactor(ext/node): create separate ops for node:http module ( #24788 )
...
This commit duplicates ops from "ext/fetch" to "ext/node" to
kick off a bigger rewrite of "node:http".
Most of duplication is temporary and will be removed as these
ops evolve.
2024-07-30 14:34:52 +02:00
Marvin Hagemeister
9a0d59d95d
fix(node/http): don't send destroyed requests ( #24498 )
...
Make sure that already destroyed requests are not actually sent.
This error was discovered in jsdom's test suite.
2024-07-10 12:01:08 +02:00
Marvin Hagemeister
2a86edf0af
fix(node/http): don't error if request destroyed before send ( #24497 )
...
A request can be destroyed before it was even made in the Node http API.
We errored on that.
This issue was discovered in the JSDOM test suite.
2024-07-10 10:05:41 +02:00
Marvin Hagemeister
07613a6bf2
fix(node/http): support all .writeHead()
signatures ( #24469 )
...
Implement the missing `.writeHead()` signatures from Node's
`ServerResponse` class that we didn't support.
Fixes https://github.com/denoland/deno/issues/24468
2024-07-09 17:46:10 +02:00
Marvin Hagemeister
28d2ff7bdc
chore: remove unused class private properties ( #24441 )
...
Noticed that these private class properties are never used. Maybe a
leftover from an earlier implementation.
2024-07-05 16:27:06 +02:00
Divy Srivastava
b290fd01f3
fix(ext/node): http chunked writes hangs ( #24428 )
...
Fixes https://github.com/denoland/deno/issues/24239
2024-07-05 08:49:42 +05:30
Marvin Hagemeister
96b527b8df
fix(node/http): don't throw on .address() before .listen() ( #24432 )
...
It's perfectly valid to access `server.address()` before calling
`.listen()`. Until a server actively listens on a socket Node will
return `null` here, but we threw a "Cannot access property 'port' of
undefined" instead.
This was discovered when inspecting failures in Koa's test suite with
Deno.
2024-07-04 18:28:48 +02:00