tracker issue : CF-4198239

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

cgi.script_name doubles string for event gateway

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/CannotReproduce

Reporter/Name(from Bugbase): John Garrett / John Garrett ()

Created: 01/05/2017

Components: Event Gateway

Versions: 11.0

Failure Type: Incorrectly functioning

Found In Build/Fixed In Build: 11,0,11,301867 / NA

Priority/Frequency: Normal / All users will encounter

Locale/System: English / Windows 10 64 bit

Vote Count: 0

Problem Description: The cgi.script_name value is incorrect when code is accessed via an Event Gateway. It's actually coming up as the correct string twice (e.g. "C:\inetpub\wwwroot\myFolder\gateway.cfcC:\inetpub\wwwroot\myFolder\gateway.cfc" instead of "C:\inetpub\wwwroot\myFolder\gateway.cfc"

Steps to Reproduce: 
1) Create a gateway event cfc file with the following OnIncomingMessage() function:
	public void function OnIncomingMessage(required struct gatewayEvent)
		writeLog("cgi.script_name: #cgi.script_name#");

2) Create a gateway type. In my case, I had created a custom socket gateway with a custom Java class.
3) Create an event gateway instance of your gateway type with the CFC Path value being the path to the gateway cfc file created in step 1.
4) Send a gateway event to the gateway instance.
5) Check the value as output in the coldfusion-out.log 

Actual Result: C:\inetpub\wwwroot\myFolder\gateway.cfcC:\inetpub\wwwroot\myFolder\gateway.cfc

Expected Result: C:\inetpub\wwwroot\myFolder\gateway.cfc

Any Workarounds: Manually check for duplicated string and remove second version of path from string.

Keywords: cgi, script_name, twice, double, duplicate



The same issue exists for cgi.PATH_TRANSLATED and cgi.CF_TEMPLATE_PATH
Comment by John G.
1370 | January 05, 2017 05:41:43 PM GMT
Actually, a correction on what the "Actual Result" is. I was doing a quick edit to obfuscate my system's directory structure are miscopied something. The actual result is: C:\ColdFusion11\cfusion\wwwroot\C:\inetpub\wwwroot\myFolder\socketGatewayProxy.cfc This probably has something to do with the CF using ColdFusion's built in server for ExpandPaht("/") - which comes up as C:\ColdFusion11\cfusion\wwwroot\
Comment by John G.
1371 | January 09, 2017 03:19:44 PM GMT
The original post's "Actual Result" value is accurate if you set an application mapping for "/" to your IIS root folder.
Comment by John G.
1372 | January 09, 2017 03:41:16 PM GMT
We tried to repro this, but did not see the issue mentioned. Could you please share the code where this is reproducible?
Comment by Immanuel N.
1373 | July 29, 2017 05:21:05 AM GMT
Withdrawing the bug as cannot reproduce. Please post back here if you continue to experience the issue, and we will reopen the bug.
Comment by Immanuel N.
1374 | September 11, 2017 04:34:10 AM GMT