[Dillo-dev] Setting the filename of a PDF response

0 views
Skip to first unread message

August Karlstrom

unread,
Sep 14, 2015, 5:31:40 AM9/14/15
to dill...@dillo.org
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

_______________________________________________
Dillo-dev mailing list
Dill...@dillo.org
http://lists.dillo.org/cgi-bin/mailman/listinfo/dillo-dev

Jorge Arellano Cid

unread,
Sep 15, 2015, 9:05:35 AM9/15/15
to dill...@dillo.org
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.-
Reply all
Reply to author
Forward
0 new messages