microsoft / microsoft/playwright
[BUG] [Chromium/WebKit] Request object does not contain postData for file/blob
Open
@yury-s is already working on this.
Since Oct 20, 2021.
browser-chromium
browser-webkit
upstream
- Dominant language
- TypeScript
- Stars
- 96.4k
- Forks
- 6.5k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 180
Description
Context:
System:
- OS: Windows 10 10.0.19043
Binaries:
- Node: 12.13.1 - C:\Program Files\nodejs\node.EXE
- Yarn: 1.19.1 - ~\AppData\Roaming\npm\yarn.CMD
- npm: 6.14.2 - C:\Program Files\nodejs\npm.CMD
Languages:
- Bash: 4.4.20 - C:\WINDOWS\system32\bash.EXE
npmPackages:
- playwright: ^1.10.0 => 1.10.0 / tip-of-tree
Code Snippet
Help us help you! Put down a short code snippet that illustrates your bug and
that we can run and debug locally. For example:
const playwright = require('.');
(async () => {
const browser = await playwright.webkit.launch();
const page = await browser.newPage();
await page.goto('http://example.com');
const requestPromise = page.waitForRequest(() => true);
const [request] = await Promise.all([
page.waitForRequest("**/*"),
page.evaluate(() => {
var file = new File(['file-contents'], 'filename.txt');
fetch('/data', {
method: 'POST',
headers: {
'content-type': 'application/octet-stream'
},
body: file
});
})
])
console.info('request.method()', request.method());
console.info('request.url()', request.url());
console.info('request.headers()', request.headers());
console.info('request.postData()', request.postData());
})();
Describe the bug
the request.postData() contains null in Chromium and WebKit. In Firefox it's filled.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.