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
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: