Setting the filename of a PDF response
I'm working on a web page with a form which generates a PDF document in memory and returns it to the user. In the response header I have set Content-Type: application/pdf Content-Disposition: attachment; filename="foo.pdf" However, Dillo seems to ignore the specified filename and instead uses the URL base name plus query string as the default filename in the download dialog window. Any suggestions? -- August
Hi, On Mon, Sep 14, 2015 at 11:29:31AM +0200, August Karlstrom wrote:
I'm working on a web page with a form which generates a PDF document in memory and returns it to the user. In the response header I have set
Content-Type: application/pdf Content-Disposition: attachment; filename="foo.pdf"
However, Dillo seems to ignore the specified filename and instead uses the URL base name plus query string as the default filename in the download dialog window. Any suggestions?
Currently, there's no parsing for this HTTP directive in dillo. If you're a C programmer it shouldn't be hard to make a patch for it. (hints: in cache.c, the http header is stored in CacheEntry_t->Header. there's also a Cache_parse_field() function) HTH. -- Cheers Jorge.-
participants (2)
-
fusionfile@gmail.com
-
jcid@dillo.org