internalRequest() not sending charset

Description

It looks like _InternalRequest() is not receiving charset

test code

index.cfm

<cfset result = _InternalRequest( template = '/labs/internalrequest/dump.cfm', method = "GET", url = stURL, form = stForm, charset = "ISO-8859-6" ) /> <cfdump var="#result.filecontent#" label="GET #result.status#" />

dump.cfm

<cfset stHTTPRequestData = getHTTPRequestData()> <cfset stPageContext = getPageContext()> <cfset stResult = [:]> <cfset stResult['method'] = stHTTPRequestData.method> <cfset stResult['content'] = stHTTPRequestData.content> <cfset stResult['headers'] = stHTTPRequestData.headers> <cfset stResult['URL'] = URL> <cfset stResult['FORM'] = FORM> <cfset stResult['REQUEST_METHOD'] = cgi.REQUEST_METHOD> <cfset stResult['query_string'] = cgi.query_string> <cfset stResult['getWebCharset'] = stPageContext.getWebCharset().tostring()> <cfset stResult['getResourceCharset'] = stPageContext.getResourceCharset().tostring()> <cfheader name="Content-Type" value="application/JSON" /> <cfoutput>#serializeJSON( stResult )#</cfoutput>

output

{"method":"GET","content":"","headers":{},"URL":{"QS1":"one","QS2":"two"},"FORM":{"FIELD1":"test one"},"REQUEST_METHOD":"GET","query_string":"QS1=one&QS2=two","getWebCharset":"UTF-8","getResourceCharset":"UTF-8"}

relates to

Activity

Show:

Pothys - MitrahSoft 21 September 2022 at 12:29

I've checked this ticket and confirmed the issue happened on the lucee version 5.3.10.76-SNAPSHOT. _InternalRequest() with charset argument works only when using response header Content-Type didn't have charset(text/html). otherwise, the charset given in the argument does not work for file content and it works only for forms & URL values.

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

Affects versions

Priority

Created 16 September 2022 at 02:16
Updated 21 September 2022 at 12:29

Flag notifications