Skip to content

Fall back to postDataBuffer() when postData() is null#4

Open
sabat24 wants to merge 1 commit into
playwright-php:mainfrom
sabat24:fix/multipart-post-data-buffer
Open

Fall back to postDataBuffer() when postData() is null#4
sabat24 wants to merge 1 commit into
playwright-php:mainfrom
sabat24:fix/multipart-post-data-buffer

Conversation

@sabat24

@sabat24 sabat24 commented Jun 29, 2026

Copy link
Copy Markdown

Fixes #3

Problem

In-process Playwright intercept passes multipart FormData (e.g. Symfony UX Live Component actions) with postData() === null while the body is available via postDataBuffer(). RequestConverter skipped parsing entirely, so the kernel received an empty POST.

Solution

Fall back to postDataBuffer() when postData() is null before content-type parsing.

Tests

  • testMultipartFormDataFallsBackToPostDataBufferWhenPostDataIsNull added

…is null

Playwright returns null from postData() for multipart/form-data while the
raw body remains available via postDataBuffer(). Without the fallback,
intercepted Live Component actions receive an empty request body.
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.

RequestConverter ignores postDataBuffer() for multipart/form-data

1 participant