PDF saving doesn't work for POST requests in Chrome

Description

If you try to download a PDF generated from a POST request, the file will not correctly save in Chrome – it doesn’t have the right name and there’s a network error in the download panel.

Repro: Open pdftestcasewrapper, click success, PDF renders OK, download the PDF – file saves OK. Click failure, post request goes out, PDF renders OK, download the PDF – file is named incorrectly, file does not save to drive.

Chrome 132.0.6834.130: fail
Firefox 134.0.2: success
Postman 10.23.9: success

Environment

Served from Ubuntu nginx with nothing interesting in re: cache or tagging going on.

Attachments

5

Activity

Show:

Zac Spitzer 18 February 2025 at 09:31
Edited

Those access control allow headers look suspicious? Also anything in the browser console?

Looks like there's additional headers being set, so can you confirm it works standalone without any additional code, i.e via application.cfc

 

Asher Densmore-Lynn 14 February 2025 at 20:16

Thank you for the immediate initial reply! I’ve been chasing down everything more on fire than this (Lucee 5.2->6.1 and MySQL 5.7->8 migration at basically the same time) and I can finally get back to this. I’ve attached two Chrome devtools results for passing and failing GET and POST.

Successful GET:

Failing POST:

Zac Spitzer 1 February 2025 at 09:33
Edited

works for me as well. sound’s like it’s a problem with the response headers?

what does your dev tools network response look like?

this is for me with tomcat 9

Asher Densmore-Lynn 31 January 2025 at 22:32

Alright, I’ll try to reproduce in that environment and then see if I can’t work out what the difference is. Thanks!

Pothys - MitrahSoft 31 January 2025 at 10:05

, I have investigated this ticket with Lucee version 6.1.1.118/docker(FROM lucee/lucee:6.1.1.118-nginx). When I tried to execute the code, the PDF name was correct in the browser, and it downloaded successfully without any issues.

Details

Assignee

Reporter

Priority

Labels

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Affects versions

Created 30 January 2025 at 17:13
Updated 18 February 2025 at 17:56