tracker issue : CF-3858955

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

[ANeff] Bug for: REST CFC function names must be 3+ characters

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Aaron Neff / Aaron Neff (Aaron Neff)

Created: 11/27/2014

Components: REST Services

Versions: 11.0

Failure Type:

Found In Build/Fixed In Build: CF11_Final / CF11 Update5

Priority/Frequency: Minor / Very few users will encounter

Locale/System: ALL / Platforms All

Vote Count: 0

Listed in the version 11.0.05.293506 Issues Fixed doc
Actual Behavior: REST CFC function names must be 3+ characters
Expected Behavior: 1 and 2 character function names should also be allowed

Repro:

Application.cfc
---------------
component {
  THIS.name = "myApp";
  public boolean function onRequestStart() {
    if(structKeyExists(URL, "reinit")) {
      restInitApplication(expandPath("./"), "pi", {useHOST=true});
    }
    return true;
  }
}

R.cfc
-----
component restpath="{a}" {remote string function pi() httpmethod="GET" {return pi();}}

1) go to http://www.domain.com/?reinit
2) see error "An error occurred while resolving the CFC: [..Path to CFC..]/R.cfc. Ensure that there are no compilation errors with the REST-enabled CFC."
3) in R.cfc, change "function pi()" to "function pie()"
4) go to http://www.domain.com/?reinit and see no error
5) go to http://www.domain.com/rest/pi/yum
6) see 3.14159265359

Want pi, get pie!

I ran into this issue b/c I was testing REST and used this:
component restpath="{a}" {remote string function f() httpmethod="GET" {return "b";}}

It took me a bit to realize the issue was b/c of the short function name =P

(yes, I ran into this before, and Adobe told me to file this, but I forgot)

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

Watson Bug ID:	3858955

External Customer Info:
External Company:  
External Customer Name: itisdesign
External Customer Email:

Attachments:

Comments:

Verified the bug, added test case at //depot/qa/cf/regression/coretests/restservices/RESTServices/bugs/CF-3858955/
Comment by HariKrishna K.
9923 | December 16, 2014 06:46:51 AM GMT
The fix for this bug is available in the pre-release build of ColdFusion 11 Update 5
Comment by CFwatson U.
9924 | February 20, 2015 09:28:52 AM GMT
Verified this is fixed in CF11 Update 5 (build 11,0,05,293506). Thanks!, -Aaron
Comment by External U.
9925 | November 22, 2015 06:43:17 PM GMT