[webkit-help] Download manager using IWebDownloadDelegate (cairo port)

Alexander Shulgin alexander.shulgin at yessoftware.com
Wed Sep 22 05:34:44 PDT 2010


On 22.09.2010 3:20, Chris Hatko wrote:
> Thanks Alex,
>
> This is very helpful while I'm in the process of writing my version.
> However, I am having one other issue in triggering the download. I
> find that some sites rely on Content-Disposition being set to
> "attachment" in the header. For example: http://typewith.me/
> (export/import, saving as html or plain text), where download decision
> can't be made on mime type alone.
>
> I've been trying to do this in the policy delegate , however I only
> have access to the request not the response that i really need. In
> other places, such as resource load delegate I have the response
> however it seems too late to make a use/download decision.
>
> Have you encountered this or perhaps have a suggestion?

Unfortunately, no and (after reading the code briefly) I found no way to 
obtain the required information through existing interface.  You might 
try extending decidePolicyForMIMEType() callback passing the response 
object.

Another option might be to try intercepting the response in 
didReceiveResponse for WebResourceLoadDelegate and later associate it 
somehow with the decide policy request.

Good luck! :)

--
Alex


More information about the webkit-help mailing list