Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update from upstream - Fetch reworks #5

Merged
merged 30 commits into from
Aug 1, 2024
Merged
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
23beba0
feat: support task deadlines (#58)
guybedford Jun 5, 2024
63a0464
Overhaul fetch implementation and host API (#52)
tschneidereit Jun 21, 2024
9946868
Implement Response.redirect (#62)
tschneidereit Jun 21, 2024
416798e
Improve handling of GC managed array buffers (#61)
tschneidereit Jun 21, 2024
827a10d
timers: allow clearTimeout and clearInterval during initialization (#63)
guybedford Jun 21, 2024
2d7031a
refactor: select to take a tasks vector reference (#60)
guybedford Jun 21, 2024
4cd78b6
Bugfixes for `setTimeout` and `setInterval` (#66)
tschneidereit Jun 21, 2024
3e5585e
fix: zero coercion timeout removal bug (#72)
guybedford Jun 22, 2024
cdd2d4f
deps: use latest rust url (#70)
guybedford Jun 22, 2024
35008af
Remove host API implementations targeting WASIp2 prereleases (#68)
tschneidereit Jun 22, 2024
4d8746f
Modularize definition and use of typed errors (#67)
tschneidereit Jun 22, 2024
4f70895
Change all error reporting to use `api::throw_error` (#73)
tschneidereit Jun 24, 2024
562e6b5
add builtin includes to error headers (#75)
guybedford Jun 25, 2024
af6c533
feat: allow direct base64 call against HandleValue (#69)
guybedford Jun 25, 2024
d7c6348
fix: support non-unique handles for timers (#71)
guybedford Jun 26, 2024
eb85b8f
feat: single-tick non-tracking event loop runner
guybedford May 29, 2024
fa1247b
fix: wasm32-wasi install for toolchain (#76)
guybedford Jul 11, 2024
9f4f9b5
Update to SpiderMonkey v127.0.2 (#77)
JakeChampion Jul 16, 2024
2a4c3f5
fix: encodings in header values (#79)
guybedford Jul 19, 2024
4af47a7
Update openssl url to new location (#82)
JakeChampion Jul 24, 2024
102ffbe
fix: headers refactoring and state transition invariants (#80)
guybedford Jul 24, 2024
cc351f2
ci: run WPT tests on CI (#81)
guybedford Jul 25, 2024
80a9d97
Fix bugs with streaming outgoing bodies (#88)
tschneidereit Jul 26, 2024
7856749
Merge branch upstream@80a9d976ceb3d76a93b932c45302bc8ac2a52376 into f…
noise64 Aug 1, 2024
6b446b5
re-enable sync fetch tests
noise64 Aug 1, 2024
f909af6
Merge remote-tracking branch 'upstream/single-tick' into fetch-rework
noise64 Aug 1, 2024
709a998
debug for test
noise64 Aug 1, 2024
1c163ca
naming
noise64 Aug 1, 2024
caeb760
disable async fetch tests again
noise64 Aug 1, 2024
228a6d9
cleanup after merge
noise64 Aug 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: encodings in header values (bytecodealliance#79)
  • Loading branch information
guybedford authored Jul 19, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 2a4c3f55e62643adef398247e56b569205f7a5cc
2 changes: 1 addition & 1 deletion builtins/web/fetch/headers.cpp
Original file line number Diff line number Diff line change
@@ -189,7 +189,7 @@ bool retrieve_value_for_header_from_handle(JSContext *cx, JS::HandleObject self,
RootedString res_str(cx);
RootedString val_str(cx);
for (auto &str : values.value()) {
val_str = JS_NewStringCopyUTF8N(cx, JS::UTF8Chars(str.ptr.get(), str.len));
val_str = JS_NewStringCopyN(cx, reinterpret_cast<char *>(str.ptr.get()), str.len);
if (!val_str) {
return false;
}
1 change: 1 addition & 0 deletions tests/integration/handlers.js
Original file line number Diff line number Diff line change
@@ -2,3 +2,4 @@ export { handler as btoa } from './btoa/btoa.js';
export { handler as performance } from './performance/performance.js';
export { handler as crypto } from './crypto/crypto.js';
export { handler as timers } from './timers/timers.js';
export { handler as headers } from './headers/headers.js';
9 changes: 9 additions & 0 deletions tests/integration/headers/headers.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { serveTest } from '../test-server.js';
import { strictEqual } from '../assert.js';

export const handler = serveTest(async (t) => {
await t.test('non-ascii-latin1-field-value', async () => {
const response = await fetch("https://http-me.glitch.me/meow?header=cat:é");
strictEqual(response.headers.get('cat'), "é");
});
});
1 change: 1 addition & 0 deletions tests/tests.cmake
Original file line number Diff line number Diff line change
@@ -38,4 +38,5 @@ test_e2e(tla-runtime-resolve)
test_integration(btoa)
test_integration(performance)
test_integration(crypto)
test_integration(headers)
test_integration(timers)