Skip to content
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

[Bug]: Playwright's webkit won't honor content-disposition on navigation #34076

Open
kblok opened this issue Dec 18, 2024 · 2 comments
Open

[Bug]: Playwright's webkit won't honor content-disposition on navigation #34076

kblok opened this issue Dec 18, 2024 · 2 comments

Comments

@kblok
Copy link
Contributor

kblok commented Dec 18, 2024

Version

1.49.0

Steps to reproduce

You don't need to write any code. This URL https://storage.googleapis.com/mabl-dev-debugging-public/attachment-disposition.gif takes you to a gif with content-disposition attachment.

Most browsers download that file:

  • Safari on macOS.
  • Chrome on macOS.
  • MS Edge on Ubuntu.
  • Epiphany on Ubuntu

But playwright's webkit shows the gif instead of downloading it.
There was an issue reported about this a few years ago #20089.

Expected behavior

I expect the gif to be downloaded.

Actual behavior

The gif is shown in the browser, so my download event will not be triggered.

Additional context

No response

Environment

System:
    OS: Linux 6.8 Ubuntu 22.04.5 LTS 22.04.5 LTS (Jammy Jellyfish)
    Memory: 6.48 GB / 15.32 GB
    Container: Yes
  Binaries:
    Node: 20.6.1 - ~/.nvm/versions/node/v20.6.1/bin/node
    npm: 9.8.1 - ~/.nvm/versions/node/v20.6.1/bin/npm
  Languages:
    Bash: 5.1.16 - /usr/bin/bash
@pavelfeldman
Copy link
Member

It looks like this is about a navigation request (goto that url) rather a click on a link with that URL. Navigation request to downloadable resources are a narrow use case - you can just fetch resource instead, you don't need a browser for that. So it'll be a low priority.

@kblok
Copy link
Contributor Author

kblok commented Dec 18, 2024

It looks like this is about a navigation request (goto that url) rather a click on a link with that URL. Navigation request to downloadable resources are a narrow use case - you can just fetch resource instead, you don't need a browser for that. So it'll be a low priority.

It's a website that you click a "download" button, it generates a resource and then it opens (window.open) a new tab with that url.
My wait for download works on chrome and Firefox but it fails in WebKit, when that behavior is a download in a real Safari.

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

No branches or pull requests

2 participants