aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/bindings/headers-cpp.h
diff options
context:
space:
mode:
authorGravatar Justin Whear <justin.whear@gmail.com> 2023-02-17 15:54:05 -0800
committerGravatar GitHub <noreply@github.com> 2023-02-17 15:54:05 -0800
commitfb313f210a51387fd77e0ddf4172ee3b52d0bdc9 (patch)
tree3cd3c3f53ea5be5e36f70ec77a1db75b3d171065 /src/bun.js/bindings/headers-cpp.h
parentc60d7db178b66a70adadb85a5054d524169397f1 (diff)
downloadbun-fb313f210a51387fd77e0ddf4172ee3b52d0bdc9.tar.gz
bun-fb313f210a51387fd77e0ddf4172ee3b52d0bdc9.tar.zst
bun-fb313f210a51387fd77e0ddf4172ee3b52d0bdc9.zip
Fix #1602 (#2066)
* 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>
Diffstat (limited to 'src/bun.js/bindings/headers-cpp.h')
-rw-r--r--src/bun.js/bindings/headers-cpp.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bun.js/bindings/headers-cpp.h b/src/bun.js/bindings/headers-cpp.h
index d0abc7db0..c57c65e18 100644
--- a/src/bun.js/bindings/headers-cpp.h
+++ b/src/bun.js/bindings/headers-cpp.h
@@ -1,4 +1,4 @@
-//-- AUTOGENERATED FILE -- 1676470760
+//-- AUTOGENERATED FILE -- 1676656020
// clang-format off
#pragma once