-
Notifications
You must be signed in to change notification settings - Fork 368
[Website] Run HTTPS test server for tcp-over-fetch-websocket tests #2903
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
Conversation
- Updated tcp-over-fetch-websocket.spec.ts to use HTTPS server instead of HTTP - Created generate-certificate utility using selfsigned library - Added duplex: 'half' option to cloneRequest for Node.js compatibility - Set NODE_TLS_REJECT_UNAUTHORIZED=0 for test environment - Still debugging POST request timeouts Co-authored-by: adamziel <205419+adamziel@users.noreply.github.com>
- Modified cloneRequest to reuse body stream directly when not consumed - This fixes the hang that occurred when converting HTTP to HTTPS requests - Added proper error handling to bufferResponse in tests - All tcp-over-fetch-websocket tests now pass Co-authored-by: adamziel <205419+adamziel@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot remove expect error: packages/php-wasm/web-service-worker/src/utils.ts:196:3 - error TS2578: Unused '@ts-expect-error' directive.
|
TypeScript now recognizes the duplex property in Request options, so the error suppression is no longer needed. Co-authored-by: adamziel <205419+adamziel@users.noreply.github.com>
Done! Removed the unused |
Motivation for the change, related issues
fetchWithCorsProxynow upgrades HTTP URLs to HTTPS. Tests making requests tohttp://127.0.0.1:PORTget upgraded tohttps://127.0.0.1:PORT, requiring an HTTPS test server.Implementation details
Test server migration to HTTPS
127.0.0.1usingselfsignedlibraryapp.listen()tohttps.createServer()NODE_TLS_REJECT_UNAUTHORIZED=0for test environmentFix request body stream handling
cloneRequest()was callingawait request.blob()to clone requests with bodiesrequest.bodyinstead of reading to Blobduplex: 'half'to Request creation for Node.js streaming body compatibility@ts-expect-errordirective as TypeScript now properly recognizes theduplexpropertyTesting Instructions (or ideally a Blueprint)
CI. All 31 tests in
tcp-over-fetch-websocket.spec.tspass, including POST requests with bodies.✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.