Lucee ignores application/x-www-form-urlencoded mimetype in CFHTTP response

Description

The mimetype key on the CFHTTP struct is supposed to be

https://helpx.adobe.com/coldfusion/cfml-reference/coldfusion-tags/tags-g-h/cfhttp.html

However, when hitting an HTTP request which returns a Content-Type of "application/x-www-form-urlencoded", Lucee incorrectly returns a mimetype of "text/plain" which makes no sense.

Lucee also returns the fileContent as a String, whereas Adobe CF returns an instance of ByteArrayOutputStream instead.

https://trycf.com/gist/3f7bf81c535d591ff7c6f27ba3d32a98/lucee5?theme=monokai

Environment

None

Attachments

4

Activity

Zac Spitzer 
1 June 2022 at 07:27

Pothys - MitrahSoft 
17 March 2022 at 06:17
(edited)

I added a testcase for 5.3
Pull Request:

Also made a correction to testcase in 6.0
Pull Request:

Pothys - MitrahSoft 
2 March 2022 at 08:10

I've checked this ticket with the lucee latest version 5.3.9.95-SNAPSHOT and Now the issue was solved.

Brad Wood 
1 March 2022 at 17:12

Thanks for addressing this!

Michael Offner 
1 March 2022 at 13:42

we have made 2 changes

  • added new mime types supported including “application-x-www-form-urlencoded“, so Lucee has not necessary to read the content to detetc that mime type of a file

  • we now distrinct in the mime type detection between is not text and could not detect the mimetype. that means if a mimetype is detected as a binary mime type, Lucee will no longer read the content of the file.

The example of the description of this ticket now outputs

Fixed

Details

Assignee

Reporter

Priority

Fix versions

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

Affects versions

Created 16 August 2021 at 21:00
Updated 1 June 2022 at 07:27
Resolved 2 March 2022 at 08:10