Skip to content

test: update formidable to v3 #35825

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mxschmitt
Copy link
Member

@mxschmitt mxschmitt commented May 1, 2025

This fixes a Dependabot Security alert and updates formidable to the latest version.

The reason for this disableRequestBodyConsumption logic is that our TestServer reads the request body in _onRequest but the formidable library attaches the 'data' handlers too late after await this.writeHeaders - this causes that the TestServer is consuming formidable's 'data' events.

One alternative which I considered is making onRequest async, awaiting the handler.call(null, request, response); call and attaching the 'data' request handlers afterwards. This seems to work in a local experiment.

Another alternative is changing postBody to a function which does the same what its doing right now but adds the 'data' event listeners when its called and requires the callee to run it inside a setRoute callback so the request is not done/ended yet. I think that is a viable solution as well.

Resolves #35823
Closes #35797

@mxschmitt mxschmitt marked this pull request as draft May 1, 2025 08:46
Copy link
Contributor

github-actions bot commented May 1, 2025

Test results for "tests 1"

1 failed
❌ [firefox-page] › page/page-evaluate.spec.ts:424:3 › should throw for too deep reference chain @firefox-ubuntu-22.04-node18

5 flaky ⚠️ [firefox-library] › library/inspector/cli-codegen-1.spec.ts:986:7 › cli codegen › should not throw csp directive violation errors @firefox-ubuntu-22.04-node18
⚠️ [webkit-library] › library/browsercontext-device.spec.ts:45:5 › device › should scroll to click @webkit-ubuntu-22.04-node18
⚠️ [webkit-library] › library/ignorehttpserrors.spec.ts:30:3 › should isolate contexts @webkit-ubuntu-22.04-node18
⚠️ [playwright-test] › ui-mode-test-output.spec.ts:80:5 › should show console messages for test @windows-latest-node18-1
⚠️ [playwright-test] › ui-mode-test-watch.spec.ts:145:5 › should watch all @windows-latest-node18-1

39118 passed, 803 skipped
✔️✔️✔️

Merge workflow run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Upgrade formidable to latest
1 participant