tracker issue : CF-3935795

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

cfhttp doesn't respect http.nonProxyHosts system property

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Bobby Lawrence / Bobby Lawrence (Bobby Lawrence)

Created: 02/06/2015

Components: Net Protocols, HTTP

Versions: 11.0

Failure Type:

Found In Build/Fixed In Build: CF11_Final /

Priority/Frequency: Normal / Some users will encounter

Locale/System: English / Win 2008 Web Server

Vote Count: 1

Listed in the version 2016.0.0.297996 Issues Fixed doc
Problem Description: Our CF server must go through a proxy to get access to machines outside its local subnet.  However, we need it to be able to access its siblings in the subnet directly without going through the proxy.  We've added the standard JVM startup arguments for specifying a proxy to http/https requests (http.proxyHost, http.proxyPort, http.nonProxyHosts) and the cfhttp call is respecting the host and port, but ignorning the nonProxyHosts.  So even if the host matches the http.nonProxyHosts, the request goes through the proxy.  

Steps to Reproduce:  Add the following JVM arguments to CF startup with values filled in:
-Dhttp.proxyHost=<host>
-Dhttp.proxyPort=<port>
-Dhttp.nonProxyHosts="<your server name>"

Restart the CF service.  Then create a page with this content (I'm running on Windows):

<cfparam name="mode" default="make_request">
<cfif mode eq "make_request">
	<cfhttp url="https://#cgi.server_name##cgi.script_name#?mode=debugging" throwOnError="no">
	</cfhttp>
	<cfoutput>#cfhttp.Filecontent#</cfoutput>
	<cfabort>
</cfif>
<cfoutput>
<cfset client_ip = cgi.remote_host>
<cfset client_dns="">
<cfexecute name="nslookup" arguments="#client_ip#" variable="client_dns" timeout="5">
ip: #client_ip#...#client_dns#
<br>
server: #cgi.server_name#
</cfoutput>


Actual Result:  The actual result is that the cgi.remote_host variable will contain the IP address of the proxy

Expected Result:  The cgi.remote_host should contain the IP address of the current machine

Any Workarounds:  None

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

Watson Bug ID:	3935795

External Customer Info:
External Company:  
External Customer Name: Bobby
External Customer Email:  
External Test Config: My Hardware and Environment details:  CF 11 running on Windows 2008 server

Attachments:

Comments:

This problem also exists in CF10 (10,0,16,293499) and versions of java 1.7.0_79 and 1.8.0_51 - but I works with Java 1.7.0_75 on windows 7
Comment by External U.
8529 | August 05, 2015 04:58:42 AM GMT
I just tired this used Java 1.7.0_75 on Windows 2008 server (using CF11) and it still doesn't work. The request still goes through the proxy. I would check your config/code again
Comment by External U.
8530 | August 05, 2015 03:04:05 PM GMT
exact same issue here. I am using CF 11 on Won 2012 JVM 1.8.0_25
Comment by External U.
8531 | September 09, 2015 02:21:09 PM GMT
Same issue here, quite severe bug as we need the proxy so CF can check for updates but now even localhost http requests are routed through the proxy (CF11 on centos)
Comment by External U.
8532 | September 18, 2015 07:05:43 AM GMT
what build is the fix going to be applied in?
Comment by External U.
8533 | September 29, 2015 07:52:15 AM GMT
We would appreciate a hotfix for this, and/or please let us know which CF11 update will contain the actual fix. It is unfortunately NOT listed in the Update 7 release notes.
Vote by External U.
8536 | November 19, 2015 01:42:32 PM GMT
We would appreciate a hotfix for this, and/or please let us know which CF11 update will contain the actual fix. It is unfortunately NOT listed in the Update 7 release notes.
Comment by External U.
8534 | November 19, 2015 01:42:49 PM GMT
This happened to me as well. CF is trying to make things more "simplistic", but actually causes some issues. In this case, it is adding those quotes to your: -Dhttp.nonProxyHosts="<your server name>" So, the options come out as: -Dhttp.nonProxyHosts=""<your server name>"" The fix is to set that property without any quotes: -Dhttp.nonProxyHosts=<your server name>
Comment by External U.
8535 | April 11, 2016 02:20:02 PM GMT