Jarred Sumner
e1eb4a4753
Improve unhandled error reporting in bun:test ( #11386 )
2024-05-27 01:55:33 -07:00
Jarred Sumner
fdbccef110
Speed up a couple tests ( #11369 )
2024-05-26 04:09:28 -07:00
Jarred Sumner
12bb5d03a2
Always propagate error in EventEmitter ( #11210 )
...
Co-authored-by: Ciro Spaciari <ciro.spaciari@gmail.com >
2024-05-22 16:39:42 -07:00
Meghan Denny
d35ea63e6d
node:http: convert Agent from class to function ( #11130 )
...
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2024-05-16 23:33:34 -07:00
Meghan Denny
ac6eaac403
test: use resource disposal to ensure servers shutdown even if tests fail ( #11106 )
2024-05-16 17:26:13 -07:00
Ashcon Partovi
998c4ca0a7
Change node-http test so it doesn't emit annotation
2024-05-13 14:37:42 -07:00
Meghan Denny
8528e9c670
make node:fs.ReadableStream and node:stream.NativeReadable constructor functions ( #10943 )
...
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2024-05-09 17:18:43 -07:00
Meghan Denny
93c0a37ec2
brotli: make sure stream encode on large inputs works as expected ( #10936 )
...
Co-authored-by: nektro <nektro@users.noreply.github.com >
2024-05-08 18:28:06 -07:00
Meghan Denny
4970ffc3a4
node:http: add agent getter to ClientRequest ( #10878 )
2024-05-06 23:05:43 -07:00
Meghan Denny
1da810adc1
node:zlib: Brotli ( #10722 )
...
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2024-05-06 22:00:04 -07:00
Ciro Spaciari
79c7abe595
fix(server) handle ignored body and node:http destroy ( #10268 )
2024-05-01 16:18:35 -07:00
Meghan Denny
a78db0b8ae
test: node:http: don't hardcode this value ( #10671 )
2024-04-29 19:18:42 -07:00
Meghan Denny
adc631c9ef
fix node:http events regression and add another test ( #10566 )
2024-04-27 00:53:51 -07:00
Meghan Denny
8280defc30
node:http: preserve this value for onListen callback ( #10533 )
2024-04-26 18:42:29 -07:00
Meghan Denny
a64554bba6
node:http.request should emit events in the right order ( #10447 )
...
* node:http.request should emit events in the right order
* Apply formatting changes
* remove runOnNextTick alias
* make private event a symbol
* clean test
* fix regressions and add more tests
---------
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
Co-authored-by: Jarred-Sumner <Jarred-Sumner@users.noreply.github.com >
2024-04-25 00:07:54 -07:00
Ciro Spaciari
4627af5893
fix(stream) fix http body-stream sending duplicate data ( #10221 )
...
* some fixes
* cleanup
* more complete test
* fix test + use same server
* opsie
* incremental steps
2024-04-12 19:58:13 -07:00
Meghan Denny
8fc08752e5
node:http: emit 'socket' event after calling http.request() ( #9270 )
...
* node:http: emit 'socket' event after calling http.request()
* add reference links for why this is how it is
* add guards to not waste time
* add a regression test
* use test harness port number
2024-03-05 23:01:32 -08:00
Ashcon Partovi
c837903e4e
Fix new Request("/") not working with node-fetch ( #9246 )
...
* Fix `new Request("/")` not working with `node-fetch`
* Address review
* Address review 2
* Fix bad test
2024-03-05 16:51:52 -08:00
ErikOnBike
4f0a497660
Fix lost constructors in Node.js module classes ( #9245 )
2024-03-04 16:12:22 -08:00
Cameron Haley
b5cea9a20c
Avoid manually destroying stream when IncomingMessage stream is done reading ( #9219 )
...
* Avoid manually destroying stream when IncomingMessage stream is done reading
* Add test
* [autofix.ci] apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-03-03 16:29:13 -08:00
Jarred Sumner
1f0c1c81e9
Fix test
2024-02-04 00:42:40 -08:00
Jarred Sumner
1009b07807
Implement server.unref() and server.ref() ( #8675 )
...
* Implement server.ref() and server.unref()
* Update dns_resolver.zig
* Update server.zig
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2024-02-03 23:57:34 -08:00
Meghan Denny
3a7df3f6c7
windows: add more passing test ( #8615 )
2024-02-01 13:45:47 -08:00
Jarred Sumner
47e7e004b1
Remove @known-failing-on-windows for tests which are no longer failing on windows
2024-01-24 21:03:32 -08:00
dave caruso
072f2f15ea
ci: run windows tests and also run them concurrently ( #7758 )
2024-01-12 17:02:20 -08:00
asomethings
54d762531a
fix: properly transform http method to uppercase ( #7982 )
...
* fix: http method uppercase transformation using wrong length
* feat: add test case for method uppercase
2024-01-04 02:54:59 -08:00
Jarred Sumner
70f344101b
Revert " feat(server): add server backlog parameter ( #7822 )" ( #7908 )
...
This reverts commit 411094b82d .
2023-12-28 23:44:27 -08:00
Hanaasagi
411094b82d
feat(server): add server backlog parameter ( #7822 )
...
* feat(server): add server backlog parameter
* add some tests
* Apply suggestions from code review
Co-authored-by: Ciro Spaciari <ciro.spaciari@gmail.com >
* fix test
* chore: fix style
---------
Co-authored-by: Ciro Spaciari <ciro.spaciari@gmail.com >
2023-12-28 14:19:20 -03:00
Vlad Sirenko
7e511f55de
4415 es5 class http.Server ( #7705 )
2023-12-20 15:55:30 -08:00
Vlad Sirenko
19e80771ac
http convert es5 class ( #7485 )
...
* http convert es5 class
* remove additional object with private fields
* add comment to http method
2023-12-14 03:03:30 -08:00
Vlad Sirenko
f0e0c6d5df
fix: improve compatibility of http.ServerResponse ( #4431 )
2023-12-05 16:15:16 -08:00
Ciro Spaciari
2d5698c719
fix(node-fetch) Set-Cookie key on node-fetch.raw() should be set-cookie instead of Set-Cookie to match nodejs behavior ( #7011 )
...
* fix set-cookie header name
* add test
* fix test
* fix test to match nodejs behavior
* oops
2023-11-09 11:59:20 -08:00
Jarred Sumner
9082193568
Add missing raw method to node-fetch polyfill ( #6976 )
...
* Add missing `raw` method to node-fetch polyfill
* Update node-fetch.ts
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-11-07 16:58:48 -08:00
Jarred Sumner
b52e503ce4
Fixes #6973 ( #6975 )
...
Fixes #6973
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-11-07 16:42:25 -08:00
Jarred Sumner
3ba9647858
Fix a couple bugs with node:http ( #6924 )
...
* Update to latest SIMDUTF
* Fix issue with `Headers.toJSON` having an incorrect size set with set-cookie header
* [node:http] Fix `undefined` when multiple Set-Cookie headers are sent
* Count UTF8 byteLength for headers
This is not necessary, just being cautious.
* Update http-hello.node.mjs
* Be 100% sure the test isn't caching anything
* move this up
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-11-06 03:51:49 -08:00
Ciro Spaciari
4d780837ac
fix(fetch) ( #6672 )
...
* fix fetch
* oops
* revert
* fix checkServerIdentity
* check dns len
* use same checks on wsclient and fetch, fix tests
* more tests and more fixes
* fix node-http flask test
* orelse
* fix requestCert
* more fixes, but no data receiving
* fix pause on connect behavior on TLS
* WS Client + rejectUnauthorized progress
* move test to the right place
* more test
* oops
* oops 2
* fmt
* cleanup
* WIP: handle handshake properly on uWS
* handle rejectUnauthorized in uWS
* fmt
* duplicated test
* fix leak
* add rejectUnauthorized option in WS types
* fix merge
* fix merge2
2023-10-30 12:56:31 -07:00
Ai Hoshino
e91436e524
fix(node:http): fix server.address() ( #6442 )
...
Closes #6413 , #5850
2023-10-17 13:18:14 -07:00
Liz
b297fabd17
fix: correctly pass the encrypted(bool) property on "Socket" for express.js ( #5878 )
...
* fix: correctly pass the encrypted property on "Socket" for express.js
Express relies on this for setting the requests protocol.
Since this is on a dummy object, a property is simply set with the actual value.
Which seams okay as a workaround.
* chore: add generated files
* chore: add test
* refactor: set property directly rather then through a getter
2023-09-21 18:44:05 -07:00
dave caruso
f77df12894
Fix HTTP listen behavior being non-compliant with node ( #5689 )
...
* Fix HTTP listen behavior being non-compliant with node
* Add error code for address in use
* use SystemError
---------
Co-authored-by: SuperAuguste <19855629+SuperAuguste@users.noreply.github.com >
2023-09-18 14:57:48 -07:00
Dylan Conway
94e9f8bdca
fix http set cookie headers ( #5428 )
...
* allow multiple set-cookie values
* make it work for `getHeader`
* move `getHeader` to cpp
* remove set-cookie check
* move `setHeader` to cpp
---------
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2023-09-14 23:03:20 -07:00
iidebyo
9101774593
avoid inserting extraneous"accept-encoding" header ( #5057 )
...
* add no extraneous accept-encoding header test
* ensure fetch honors no decompress opt
* fix format on test/js/node/http/node-http.test.ts
2023-09-13 02:02:25 -07:00
Dylan Conway
895f3824b5
update test
2023-09-11 10:43:33 -07:00
Ashcon Partovi
ffe4f561a3
Fix listen() using unix socket if argument is a valid port ( #4620 )
...
* Fix listen() using unix socket if argument is a valid port
Fixes #4582
* Add test
2023-09-08 16:27:44 -07:00
Ciro Spaciari
4360ec83b4
feat(fetch) rejectUnauthorized and checkServerIdentity ( #4514 )
...
* enable root certs on fetch
* rebase
* fix lookup
* some fixes and improvements
* fmt
* more fixes
* more fixes
* check detached onHandshake
* fix promise case
* fix cert non-Native
* add fetch tls tests
* more one test
2023-09-06 22:23:24 -07:00
Ciro Spaciari
908018a4df
fix(http/https) disable decompress on http/https client ( #4399 )
...
* disable decompress on http/https module
* make js again
2023-08-30 13:50:09 -03:00
dave caruso
a846852818
fix(node-fetch): use stream.Readable instead of web streams ( #4394 )
...
* fix blobFrom
* fix(node-fetch): use stream.Readable instead of web streams
* uncomment
* comment why
2023-08-29 19:45:16 -07:00
Ai Hoshino
3f4bc625ff
parse unix socket path param in http.server ( #4390 )
2023-08-29 19:39:12 -07:00
Ai Hoshino
6e57556fad
Fix(node:http): fix URL formatting when using a proxy. ( #4297 )
...
Close : #4295
2023-08-24 17:17:18 -07:00
Ai Hoshino
339d2c7f19
Make the server not crash if an error occurs in dev build. ( #4300 )
...
Close : #4298
2023-08-24 17:16:51 -07:00
dave caruso
f74585ff01
Allow IncomingRequest.req to be overwritten. ( #4154 )
...
* Allow IncomingRequest.req to be overwritten.
* add test
* fix test
* yoo
2023-08-17 14:57:43 -07:00