搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

Download "save as" dialog doesn't appear until first bytes of the response body are received

  • 2 个回答
  • 0 人有此问题
  • 2 次查看
  • 最后回复者为 Kalith

more options

Hello! I am developing a web server, from which users can download large files. These files take a few seconds to generate, and cannot be generated ahead-of-time; only when a user requests them. The server therefore responds to such requests by first sending the HTTP response headers (without "Content-Length"), which can be written immediately, then generating the file, and sending the generated file as the response body.

In Chromium, this leads to the "Save As..." dialog appearing instantly, so the file can be generated & downloaded in the background while the user picks a location.

In Firefox (v132, linux x64), the "Save As..." dialog waits for the file to be generated before appearing, which is not user-friendly. During deeper testing, I discovered that Firefox appears to wait for my server to send at least 1 byte of data from the file (in the response body, after sending the HTTP response headers), before the "Save As..." dialog appears.

I have searched the Firefox settings and documentation but did not find anything that would explain this behavior. Is this a bug?

Hello! I am developing a web server, from which users can download large files. These files take a few seconds to generate, and cannot be generated ahead-of-time; only when a user requests them. The server therefore responds to such requests by first sending the HTTP response headers (without "Content-Length"), which can be written immediately, then generating the file, and sending the generated file as the response body. In Chromium, this leads to the "Save As..." dialog appearing instantly, so the file can be generated & downloaded in the background while the user picks a location. In Firefox (v132, linux x64), the "Save As..." dialog waits for the file to be generated before appearing, which is not user-friendly. During deeper testing, I discovered that Firefox appears to wait for my server to send at least 1 byte of data from the file (in the response body, after sending the HTTP response headers), before the "Save As..." dialog appears. I have searched the Firefox settings and documentation but did not find anything that would explain this behavior. Is this a bug?

所有回复 (2)

more options

Unfortunately this is just a user help forum not a developer posting forum. If there is a issue then you need to do a firefox Bugzilla and send the issue to the developer to look at.

有帮助吗?

more options

Thank you, will do. It would be good if the Mozilla support pages had a link to these, to guide fellow developers to the right support area.

Edit: I have opened a bugzilla ticket: https://bugzilla.mozilla.org/show_bug.cgi?id=1943972

由Kalith于修改

有帮助吗?

我要提问

您需要登录才能回复。如果您还没账号,可以提出新问题