Files
bun.sh/test/js/web/fetch/fetch-reject-authorized-env-fixture.js
Ciro Spaciari 4d780837ac fix(fetch) (#6672)
* fix fetch

* oops

* revert

* fix checkServerIdentity

* check dns len

* use same checks on wsclient and fetch, fix tests

* more tests and more fixes

* fix node-http flask test

* orelse

* fix requestCert

* more fixes, but no data receiving

* fix pause on connect behavior on TLS

* WS Client + rejectUnauthorized progress

* move test to the right place

* more test

* oops

* oops 2

* fmt

* cleanup

* WIP: handle handshake properly on uWS

* handle rejectUnauthorized in uWS

* fmt

* duplicated test

* fix leak

* add rejectUnauthorized option in WS types

* fix merge

* fix merge2
2023-10-30 12:56:31 -07:00

9 lines
225 B
JavaScript
Generated

const { SERVER } = process.env;
try {
const result = await fetch(SERVER).then(res => res.text());
if (result !== "Hello World") process.exit(2);
} catch (err) {
process.exit(err.code.indexOf("CERT") !== -1 ? 1 : 3);
}