tracker issue : CF-3938424

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

An empty CFHTTP useragent attribute forces use of "Apache-HttpClient/4.3.5 (java 1.5)"

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): James Moberg / James Moberg (James Moberg)

Created: 02/11/2015

Components: Net Protocols, HTTP

Versions: 10.0

Failure Type: Incorrect w/Workaround

Found In Build/Fixed In Build: Final /

Priority/Frequency: Normal / All users will encounter

Locale/System: English / Win 2008 Server R2

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:

Perform a CFHTTP GET or POST request with an empty useragent.  If the parameter is omitted, it defaults to "ColdFusion". It an empty parameter is used, "Apache-HttpClient/4.3.5 (java 1.5)" is used as the user agent.  (NOTE: This functions properly in ColdFusion 9, but returns different results in ColdFusion 10. I have not tested ColdFusion 11.)

Steps to Reproduce:

    This returns "ColdFusion" as HTTP_USER_AGENT.
    <cfhttp url=""></cfhttp>

    This returns "Apache-HttpClient/4.3.5 (java 1.x)" as HTTP_USER_AGENT.
    <cfhttp url="" useragent=""></cfhttp>

Actual Result:
    Apache-HttpClient/4.3.5 (java 1.x)

Expected Result:

Any Workarounds:
    Include an additional empty CFHTTPARAM header variable.
    <cfhttpparam type="HEADER" name="http_user_agent" value="">

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

Watson Bug ID:	3938424

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

ColdFusion 10,0,15,292620 Developer

Windows Server 2008 R2

Java 1.7.0_15



"Expected Result" Note: If passing an empty useragent in the CFHTTP tag, I actually expected an empty string to be passed... not "ColdFusion".
Comment by External U.
8501 | February 11, 2015 12:32:08 PM GMT
When empty string is specified in the useragent passing down the same empty string value to the user agent header. This prevents setting up apache httpclient specific user agent header.
Comment by S V.
8502 | September 21, 2015 01:14:47 AM GMT
Verified on build #295692.
Comment by Akhila K.
8503 | September 24, 2015 02:19:22 AM GMT
Hi Adobe, I've verified this is fixed in CF2016 Update 1 (build 2016.0.01.298513), as useragent="" now omits the user-agent header. Thanks!, -Aaron
Comment by Aaron N.
31265 | September 02, 2019 10:05:53 AM GMT