tracker issue : CF-4181591

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

URLs with /api/ Fails with 500.0 - Internal Server Error

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/Fixed

Reporter/Name(from Bugbase): Amit K / Amit K (Amit K)

Created: 08/16/2016

Components: Administrator, Administrator Console, API Manager, REST Services

Versions: 2016

Failure Type: Non Functioning

Found In Build/Fixed In Build: CF2016_Update1 / 308425

Priority/Frequency: Normal / Some users will encounter

Locale/System: English / Win 2012 Server x64

Vote Count: 10

Problem Description:
I have a folder named api in my root directory and I placed a file test.cfm in that directory.
When I try to browse the URL http://<mywebsite.com>/api/test.cfm , it fails with a HTTP Error 500.0 - Internal Server Error
If I rename that folder 'api' to something else, it just works fine. 
Also I confirmed that this behavior doesn't exist in CF11.

I was able to confirm this behavior with the Adobe support and he suggested that I log a bug.

Steps to Reproduce:
Create a folder 'api' in your root dir.
Place a CFM file inside the api directory
Brose the file

Actual Result:
HTTP Error 500.0 - Internal Server Error
Detailed Error Information:
Module	   IsapiModule
Notification	   ExecuteRequestHandler
Handler	   ISAPI-dll
Error Code	   0x00000000
Requested URL	   https://mywebsite.com:443/jakarta/isapi_redirect.dll
Physical Path	   C:\ColdFusion2016\config\wsconfig\6\isapi_redirect.dll
Logon Method	   Anonymous
Logon User	   Anonymous

Expected Result:

Any Workarounds:

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

Watson Bug ID:	4181591

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

CF2016 running in Windows Server 2012

Attachments:

Comments:

Please fix this bug asap . Due to this bug our API's are not working and we cannot be changing URLs in production to fix this .
Vote by External U.
2009 | August 17, 2016 06:29:55 PM GMT
This error is blocking for my project as well. Please have it fixed as soon as possible.
Vote by External U.
2010 | August 17, 2016 06:32:39 PM GMT
https://chl-author-preview.corp.adobe.com/content/help/en/coldfusion/cfml-reference/reserved-words-and-variables/reserved-words.html Let me know if it's good to be made live.
Comment by Saurav G.
2002 | August 18, 2016 07:13:00 AM GMT
Please fix this bug ASAP!
Vote by External U.
2011 | August 18, 2016 10:02:34 AM GMT
The link doesn't work for me https://chl-author-preview.corp.adobe.com/content/help/en/coldfusion/cfml-reference/reserved-words-and-variables/reserved-words.html
Comment by External U.
2003 | August 18, 2016 11:49:24 AM GMT
This is a behavior that we introduced in ColdFusion 11 Update 1, after we fixed the following bug: https://bugbase.adobe.com/index.cfm?event=bug&id=CF-3791392. We will document the above behavior . Thanks, Suchika.
Comment by Suchika S.
2004 | August 19, 2016 03:26:01 AM GMT
This is not an issue for me in CF11. The url works fine for me when running my app in CF11 update 9, but fails in CF2016 Update 2
Comment by External U.
2005 | August 19, 2016 04:37:51 PM GMT
+1 please fix. Note for anyone who finds this bug report: You can remove the mapping by going to cfinstall/cfusion/wwwroot/WEB-INF/web.xml. Search for the api servlet-mapping and comment it out. As the bug tracker does not seem to cross-reference bug reports. This seems to relate to: https://tracker.adobe.com/#/view/CF-4126451 https://tracker.adobe.com/#/view/CF-4198400
Vote by John W.
2012 | April 07, 2017 11:36:10 AM GMT
This is not related to CF11. It is the API manager mapping in /WEB-INF/web.xml which hi-jacks the URL. This should only be applied, if when installing, the API manager is also installed so it doesn't break lots of existing applications.
Comment by John W.
2006 | April 07, 2017 11:38:40 AM GMT
Agree with John. CF should not presuppose the API Manager will be used (this will almost always NOT be the case), and the API Manager should not pre-suppose it can simply steamroll URLs starting with /api. It should just be an install option to pick a value for this. If it had a default, it should be something less likely to already be in use.
Comment by Adam C.
2007 | April 07, 2017 11:59:35 AM GMT
Agree w/ Adam, from start to finish. Also, most? CF users wouldn't even have access to web.xml. Warrants re-think. Thanks!, -Aaron
Comment by Aaron N.
2008 | April 08, 2017 12:30:25 AM GMT
I just voted for this in CF-4198400 too.
Vote by David B.
2013 | April 13, 2017 11:28:20 PM GMT
Saurav above links to the CF docs for the reserved words page. While he offers an internal-only link, and the correct link is instead https://helpx.adobe.com/coldfusion/cfml-reference/reserved-words-and-variables/reserved-words.html, I don't see any reference to /api as being reserved. Then again, that's the CFML Reference, and really talking about reserved words in the language. This is more about a reserved word in URLs (and /rest is another). I hope someday Adobe may address this issue, of /api references failing with already-existing URLs (folders) with that name. As Aaron N says above, not everyone could readily tweak the web.xml (and worse, someone may do it to "fix" their problem and not realize that they now have broken the CF REST feature's reliance on that /api URL.)
Comment by Charlie A.
27572 | April 14, 2018 07:00:57 PM GMT
 /api mapping was used internally in CF for the REST discovery feature of the API Manager. Now we have got the mapping name changed to /cfapiresources . So, creating URL with /api in it or creating a folder named 'api' in CF's webroot should be accessible now. This is fixed in CF2018 and should be available in GM Build. For CF2016 this fix should be available in next bug-fix update.
Comment by Nitin K.
27573 | April 23, 2018 12:27:16 PM GMT
I should note that even after removing the mapping, the default document of index.cfm still does not appear to be working. I can confirm that default document / welcome-file-list is working for other folders.
Comment by Justin T.
28996 | June 06, 2018 12:30:10 PM GMT