mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-13 20:03:46 +00:00
feat: HTTP add TLS fingerprint fallback (#1444)
This commit is contained in:
68 files changed
+7243
-1604
No files matched your search
@@ -0,0 +1,17 @@
|
||||
// META: global=window,worker
|
||||
// META: title=Request keepalive
|
||||
// META: script=/common/utils.js
|
||||
// META: script=/common/get-host-info.sub.js
|
||||
|
||||
test(() => {
|
||||
assert_false(new Request('/').keepalive, 'default');
|
||||
assert_true(new Request('/', {keepalive: true}).keepalive, 'true');
|
||||
assert_false(new Request('/', {keepalive: false}).keepalive, 'false');
|
||||
assert_true(new Request('/', {keepalive: 1}).keepalive, 'truish');
|
||||
assert_false(new Request('/', {keepalive: 0}).keepalive, 'falsy');
|
||||
}, 'keepalive flag');
|
||||
|
||||
test(() => {
|
||||
const init = {method: 'POST', keepalive: true, body: new ReadableStream()};
|
||||
assert_throws_js(TypeError, () => {new Request('/', init)});
|
||||
}, 'keepalive flag with stream body');
|
||||
Reference in new issue
Block a user