tracker issue : CF-3977514

select a category, or use search below
(searches all categories and all time range)
Title:

CFHTTP Illegal Argument: Illegal character in query at index X in CFHTTPPARAM

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Tom Lofts / Tom Lofts (Tom Lofts)

Created: 04/28/2015

Components: Net Protocols, HTTP

Versions: 11.0

Failure Type: Incorrect w/Workaround

Found In Build/Fixed In Build: CF11_Final /

Priority/Frequency: Minor / Few users will encounter

Locale/System: ALL / Win 2012 Server x64

Vote Count: 0

Listed in the version 2016.0.0.297996 Issues Fixed doc
Verification notes: verified_fixed on September 02, 2019 using build 2016.0.01.298513
Problem Description:

We have discovered a bug as part of an application migration from CF8 to CF11. In CF8 the 'name' attribute in the CFHTTPPARAM tag may contain special characters (e.g. "|") which are URL encoded when sent to the server when type='url' is used. 

In CF11 this is no longer the case, and using special characters in the name attribute results in the following error CFHTTP Illegal Argument: Illegal character in query at index X.

Steps to Reproduce:

<cfhttp url="http://www.example.com">
	<cfhttpparam type="url" name="|" value="">
</cfhttp>

<cfdump var="#cfhttp#">

Actual Result:

Charset 	[empty string]
ErrorDetail 	Illegal Argument: Illegal character in query at index 23: http://www.example.com?|=
Filecontent 	Connection Failure
Header 	[empty string]
Mimetype 	Unable to determine MIME type of file.
Responseheader 	
struct [empty]
Statuscode 	Connection Failure. Status code unavailable.
Text 	YES 

Expected Result:

A standard CFHTTP structure with a 200 Statuscode

Any Workarounds:

It's possible to use URLEncodeFormat to encode the name attribute to work around the issue:

<cfhttp url="http://www.example.com">
	<cfhttpparam type="url" name="#URLEncodedFormat("|")#" value="">
</cfhttp>

<cfdump var="#cfhttp#">

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3977514

External Customer Info:
External Company:  
External Customer Name: Tom
External Customer Email:  
External Test Config: My Hardware and Environment details:

Attachments:

Comments:

This issue is fixed and the fix for this issue will be available as part of next major release of ColdFusion.
Comment by Nimit S.
7710 | September 23, 2015 01:39:54 AM GMT
Hi Adobe, I've verified this is fixed in CF2016 Update 1 (build 2016.0.01.298513). Thanks!, -Aaron
Comment by Aaron N.
31260 | September 02, 2019 08:00:13 AM GMT