cfcontent delivers wrong content-type

Description

When using the cfcontent-tag without type-attribute, the content-type is always text/html.
Coldfusion uses the content-type from the given file.

Example:
<cfcontent file="assets/img/img-code.png" />
Content-Type Lucee: text/html
Content-Type Coldfusion: image/png

Activity

Show:

Pothys - MitrahSoft 9 November 2021 at 11:30

I've checked this ticket with fixed versions and also added a testcase to this ticket. Now using the cfcontent without type attribute sets file mime-type as content-Type.

Pull Request: Added a testcase to check content-Type of cfcontent without type attribute for LDEV-3742 by cfmitrah · Pull Request #1460 · lucee/Lucee

Michael Offner 5 November 2021 at 16:54

thanks a lot for your contribution!

can you please give it a try and add a test case for it, thanks.

David Raschper 18 October 2021 at 14:27

Pull-Request: https://github.com/lucee/Lucee/pull/1451
Another Problem is that currently charset=utf-8 is always set.
But i guess thats another issue: https://luceeserver.atlassian.net/browse/LDEV-2995

Fixed

Details

Assignee

Reporter

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

Sprint

Fix versions

Affects versions

Priority

Created 18 October 2021 at 12:57
Updated 18 September 2024 at 10:18
Resolved 9 November 2021 at 11:30

Flag notifications