If a filename is provided for an HTML document in the Content-Disposition META tag, in the following (and correct) fashion:
<meta http-equiv="Content-Disposition" content="inline; filename=myname.html">
it is completely ignored by the Safari browser when you choose "Save as..." for the page source. Instead, Safari creates its own file name from the page's TITLE attribute and appends a ".html" suffix to it. This is, I believe, a violation of the standard. At any rate, Firefox behaves correctly and respects the Content-Disposition filename.
Of course, this is a trivial bug, but it would be nice to see it fixed -- especially since the fix would require very little work indeed.
Confirmed with WebKit 418.8 and the latest nightly build.
Please correct me if I'm wrong, but this is faulty behaviour in Safari rather than in WebKit as such, right? The GUI shell around WebKit that is the Safari browser is not open source, and thus this bug could not be fixed by 3rd parties, unless I'm much mistaken.
Safari doesn't look inside HTML files, so this is (at least partially) a WebKit bug. It needs to pass this information to Safari.
I'm not sure if this behavior is mandated by any specifications though, and it might be dangerous to override Content-Disposition from HTML content, even if Firefox does just that. For example, a firewall may not support that, and thus be fooled about the kind of content.
IMO this is a Safari bug, not a WebKit one. It may require a WebKit a change to expose information for Safari to use, but the problem is in Safari so this should be tracked via Radar.
Retitling to reflect the nature of the request.
Since this bug is requesting an enhancement to Safari rather than WebKit, Bugzilla is not an appropriate location to track this request. The bug has been migrated to Radar and that bug will be used by the Safari team to track the enhancement that you have requested. This Bugzilla bug will be closed as INVALID to indicate that the issue is outside of WebKit.