aboutsummaryrefslogtreecommitdiff
path: root/src/js/node/http.ts (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-10-09fix(AbortSignal/fetch) fix AbortSignal.timeout, fetch lock behavior and ↵Gravatar Ciro Spaciari 1-1/+1
fetch errors (#6390) * fix abort signal and fetch error * fix fetch error and lock behavior
2023-10-04Closes #6309 (#6310)Gravatar Colin McDonnell 1-1/+1
2023-09-29fix(runtime): followup for `server.requestIP` (#6185)Gravatar dave caruso 1-1/+1
* fix(runtime): followup for `server.requestIP` * oops * yeah * sure * Update src/deps/libuwsockets.cpp * Update Dockerfile * lol --------- Co-authored-by: Jarred Sumner <jarred@jarredsumner.com> Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-09-29feat(runtime): implement `server.requestIp` + node:http `socket.address()` ↵Gravatar dave caruso 1-16/+33
(#6165) * [server] requestIp and AnyRequestContext Changed Request.uws_request to the new AnyRequestContext. This allows grabbing the IP from a Request. Unfinished. * [server] basic `requestIp` implementation Currently using uws's requestIpAsText, which always returns a ipv6 string. We should return a `SocketAddress` object to the user instead, which will contain the formatted address string and what type it is. We'll have to use requestIpAsBinary and parse that ourselves. * TypeScript docs, use `bun.String`, return `undefined` instead of `null` if we can't get the ip. * binary address formatting * uws getRemoteAddress binding * remove dead code * working * final touches:sparkles: * I will abide by the results of this poll. --------- Co-authored-by: Parzival-3141 <29632054+Parzival-3141@users.noreply.github.com>
2023-09-21fix: correctly pass the encrypted(bool) property on "Socket" for express.js ↵Gravatar Liz 1-1/+1
(#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-18Fix HTTP listen behavior being non-compliant with node (#5689)Gravatar dave caruso 1-1/+1
* 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-14fix http set cookie headers (#5428)Gravatar Dylan Conway 1-12/+6
* 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-08Fix listen() using unix socket if argument is a valid port (#4620)Gravatar Ashcon Partovi 1-1/+1
* Fix listen() using unix socket if argument is a valid port Fixes #4582 * Add test
2023-09-07Progress for Next.js (#4468)Gravatar dave caruso 1-2/+3
* L * ipc * asdfghjkl * dfghjk * it works! * types * patches for next.js * sdfghj * wsdfgn,./ * this * yolo * okay loser * asdfghjk * add some more APIs * MESS * sdfghjkl * remove native events from streams * stuff * remove lazy(primordials) test * debugging * okay * less fake extensions object * fix `Buffer.toString()` args logic * fix deserialize * make tests work * add test for `Buffer.toString` args * Update server.zig * remove test * update test * Update spawn-streaming-stdin.test.ts * fix linux build * Update fs.test.ts * cli message improvements * dfshaj * Fix fs.watch bug maybe? * remove --------- Co-authored-by: Dylan Conway <dylan.conway567@gmail.com>
2023-08-30fix(http/https) disable decompress on http/https client (#4399)Gravatar Ciro Spaciari 1-0/+3
* disable decompress on http/https module * make js again
2023-08-29parse unix socket path param in `http.server` (#4390)Gravatar Ai Hoshino 1-0/+5
2023-08-24Fix(node:http): fix URL formatting when using a proxy. (#4297)Gravatar Ai Hoshino 1-14/+20
Close: #4295
2023-08-17Allow IncomingRequest.req to be overwritten. (#4154)Gravatar dave caruso 1-5/+1
* Allow IncomingRequest.req to be overwritten. * add test * fix test * yoo
2023-08-03Minor optimization: Avoid extra copying when the chunk has only one element. ↵Gravatar Ai Hoshino 1-1/+1
(#3946) * Optimize the case where there is only one chunk. * add generated code
2023-08-02Fix http write (#3939)Gravatar dave caruso 1-10/+8
* Fix encoding problem when uploading a binary file. Close: #3116 * use BufferList * Finish rebase --------- Co-authored-by: Hanaasagi <ambiguous404@gmail.com>
2023-08-02Rewrite built-in modules to use CommonJS over ESM (#3814)Gravatar dave caruso 1-44/+36
* stfdsafsd sadffdsa stuff finish commonjs stuff asdf not done but work not done but work not done yet but this is how far i am remove files lol update built files uncomment everything in events lol export default stuff * afdsafsd * its not perfect but almost done * okay * cool * remove temp file * finish rebase * revert settings.json * a * ch-ch-ch-ch-changes * okay * remove this check in release for now * sxdcfghnjm, * lkjhgf * fmt * filename can be null * Update NodeModuleModule.h * weee * fmt --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-07-12Improve our internal typedefs (#3608)Gravatar dave caruso 1-1/+1
* types * some more * yeah * i think that fixes it * oop
2023-07-11fix #3597 (#3609)Gravatar Dylan Conway 1-0/+19
* fix #3597 * Update http.ts * initialize to true
2023-07-11Avoid Object.getPrototypeOfjarred/fix-http-compressionGravatar Jarred Sumner 1-3/+13
2023-07-11use `Object.getPrototypeOf`Gravatar Hanaasagi 1-3/+1
2023-07-11small fix, check if the method has been reassigned.Gravatar Hanaasagi 1-2/+5
2023-07-10ignore checkGravatar Hanaasagi 1-2/+2
2023-07-10Merge branch 'main' into fix-httpGravatar Ai Hoshino 1-36/+96
2023-07-10call `writeHead` before send headersGravatar Hanaasagi 1-1/+5
Close: #3585
2023-07-10Fixes #3588 (#3590)Gravatar Jarred Sumner 1-36/+96
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-06-30fix: export `ClientRequest` and `OutgoingMessage` as part of the `node:http` ↵Gravatar Stijn Van Hulle 1-0/+2
package (#3470)
2023-06-29Fixes `node:http` and `node:stream` so `ytdl-core` works. (#3452)Gravatar dave caruso 1-0/+1810
* fix crash in readablestate * make node:https request+get actually use https * use a native readablestream in IncomingMessage * tweaks * fix abort crash * emit close by default * remove abort. this isnt a real function * add validate functions, fixup some other requested changes. not done yet * Update WebCoreJSBuiltins.cpp * Update JSReadableState.cpp * Add some missing exports --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>