aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/bindings/webcore/JSFetchHeaders.cpp (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-10-03Upgrade webkit (#6277)Gravatar Dylan Conway 1-1/+1
* `reportExtraMemoryAllocated` parameters changed * bump webkit * Update Dockerfile * format
2023-09-14fix http set cookie headers (#5428)Gravatar Dylan Conway 1-12/+16
* 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-08-24Listen on a unix domain socket with Bun.serve() (#4311)Gravatar Jarred Sumner 1-0/+4
* Update response.zig * Comment this out for now * Support unix domain socket in Bun.serve() * Add test * add types * Update JSFetchHeaders.cpp * comment this test out * tls unix web socket serve options --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Co-authored-by: dave caruso <me@paperdave.net>
2023-08-24Report extra memory more (#4289)Gravatar Jarred Sumner 1-0/+17
* Report memory allocated in fetch * Memory size reporting to `Headers` * Fixup memory reporting allocator * Make these tests do more * cleanup some of this --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-08-18Remove most C API usages, add debugger pretty printers for `Headers`, ↵Gravatar Jarred Sumner 1-55/+59
`URLSearchParams`, `FormData`, `Worker`, `EventTarget` (#4187) * Add pretty printers for `Headers`, `URLSearchParams`, and `FormData` * [untested] Add way to code generate getInternalProperties * bump * Bump Webkit * Ref the event loop while loaded * wip * checkpoint * another checkpoint * The code has been written * Fixup exports * Fix all the errors * Fix bug * [console.log] Fix bug when printing non-reified types missing values * Fix loading hash table * fix plugin * Fix ref & unref * auto-unref * various fixes * Update bun.zig * Set toStringTag * Delete code for macro JSX * Delete code for `bun dev` HTTP JS * Move Bun.serve to C++ API * Delete JSC C API code * :scissors: :skull: code * Use JSC C++ for `confirm`, `Crypto`, `prompt`, `alert` * more dead code * Update exports.zig * Use JSC C++ API for FFI * Remove remaining usages * Remove remaining usages * Update ffi.ts * Update InternalModuleRegistryConstants.h * draw the rest of the owl * Update webcore.zig * bind it * Fix performance regression in crypto.randomUIUD() * Update js_parser.zig --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-08-08Enable `Headers.prototype.getSetCookie`Gravatar Jarred Sumner 1-23/+10
Fixes #4057
2023-07-30remove unnecessary moveGravatar Jarred Sumner 1-1/+1
2023-07-17Fix speculative crashes in console.log(formData) and console.log(headers)Gravatar Jarred Sumner 1-22/+6
2023-05-26Pretty formatter for `Headers` & `URLSearchParams` (#3081)Gravatar Jarred Sumner 1-1/+1
* Pretty formatter for `Headers` & `URLSearchParams` * cleanup * console.log on Headers, FormData, URLSearchParams will always quote the keys now --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-05-21Upgrade WebKit (#2980)Gravatar Jarred Sumner 1-1/+1
* [internal] Show the file path to the calling function from JS * [internal] Make `JSC.NewFunction` more type safe * Upgrade WebKit * Finish --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-03-03fix(node:http): match Node headers casing (lowercase only) (#2288)Gravatar Derrick Farris 1-1/+1
* fix(node:http): match Node headers casing (lowercase only) * fix(JSFetchHeaders): `WTFMove` the ascii string
2023-02-17Fix #1602 (#2066)Gravatar Justin Whear 1-13/+13
* initial test case * fix segfault from JSObjectMakeDeferredPromise * pass exceptions through from FetchHeader.createFromJS * not resolved, but getting close * implement review suggestions * fix exception check, tests * Change how header filtering is accomplished Previously the FetchHeaders implementation relied on converting names and values to IDLByteString to catch non-ASCII data, though not always reliably. This resulted in message-less TypeErrors when headers contained invalid characters. This commit shifts everything to IDLDOMString for the conversion and relies on the actual error checking in FetchHeaders.canWriteHeader, resulting in nicer error messages. To ensure that all headers are written as ASCII/UTF8 rather than UTF16, the copyTo bindings function checks the encoding and converts if necessary. * wrapping up FetchHeader fixes * since utf8 allocates only do so when needed * Update src/bun.js/bindings/bindings.cpp Co-authored-by: Jarred Sumner <jarred@jarredsumner.com> * WebCore__FetchHeaders__has should return on exception path * strip out log calls from test --------- Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
2023-02-11Backport std::forward changeGravatar Jarred Sumner 1-4/+4
2022-12-02Make constructing headers from an existing headears fasterGravatar Jarred Sumner 1-0/+1
2022-12-02Throw if passing a header not named "set-cookie" to `getAll`Gravatar Jarred Sumner 1-1/+1
2022-12-02Remove `getSetCookie`Gravatar Jarred Sumner 1-1/+1
2022-12-02[fetch] Implement `Headers#getAll` and `Headers#getSetCookie()`Gravatar Jarred Sumner 1-0/+140
This matches Deno's behavior (get() combines, iterator preserves the order, set and append combine), but implements both the Cloudflare Workers `getAll()` and the potential standard `getSetCookie` function. The rationale for choosing both is to better support libraries which check for `getAll` and also because `getSetCookie` seems a little confusing (names are hard) This also makes `.toJSON` and JSON.stringify return an array for `Set-Cookie`
2022-11-27Fix crash in Headers.prototype.countGravatar Jarred Sumner 1-2/+5
2022-08-27Update WebKit (#1165)Gravatar Jarred Sumner 1-12/+12
* Update WebKit * Fix `DataView` and non-8 bit sized typed arrays with TextDecoder * New WebKit Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2022-08-22[node:http] speed up assigning headersGravatar Jarred Sumner 1-19/+15
2022-08-22Add some optimizations to FetchHeadersGravatar Jarred Sumner 1-2/+86
2022-06-22change the directory structurejarred/renameGravatar Jarred Sumner 1-0/+502