Title:
[ANeff] Bug for: REST exception without produces not triggering site wide error handler
| View in TrackerStatus/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Aaron Neff / Aaron Neff (Aaron Neff)
Created: 12/11/2014
Components: REST Services
Versions: 11.0
Failure Type:
Found In Build/Fixed In Build: CF11_Final /
Priority/Frequency: Normal / Some users will encounter
Locale/System: ALL / Platforms All
Vote Count: 0
When a REST exception is thrown, the site-wide error handler is not triggered when the "Accept" header is "text/html", unless the REST service also has attribute produces="text/html"
Repro:
Application.cfc
---------------
component {
THIS.name = "ticket_3506757";
THIS.applicationTimeout = createTimeSpan(0,0,0,30);
function onApplicationStart() {
restInitApplication(expandPath("./"), "foo");
}
}
R.cfc
-----
component restpath="a" {remote string function abc() httpmethod="GET" {foo=bar; return "b";}}
index.cfm
---------
<cfhttp url="http://www.domain.com/rest/foo/a">
<cfhttpparam type="header" name="Accept" value="text/html">
<cfhttpparam type="header" name="Accept-Encoding" value="deflate;q=0">
<cfhttpparam type="header" name="TE" value="deflate;q=0">
</cfhttp>
<cfdump var="#CFHTTP#">
--------------------------------------------
Request:
--------------------------------------------
GET /rest/foo/bar HTTP/1.1
User-Agent: ColdFusion
Accept: text/html
Accept-Encoding: deflate;q=0
Connection: close
TE: deflate;q=0
Host: www.domain.com
--------------------------------------------
Response:
--------------------------------------------
HTTP/1.1 500 Internal Server Error
Content-Type: text/html
Date: Mon, 08 Dec 2014 07:30:21 GMT
Connection: close
Content-Length: 21
Internal Server Error
--------------------------------------------
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3866282
External Customer Info:
External Company:
External Customer Name: itisdesign
External Customer Email:
External Test Config: CF: CF11 Update 3 (11,0,03,292480) Enterprise Standalone
OS: x64 Win 2008
IIS: 7
Java: 1.7.0_55
isapi_redirect.dll: v1.2.40.0 Modified Monday, ?November ?10, ?2014, ??5:14:48 PM
Site-wide Error Handler: /CFIDE/administrator/templates/secure_profile_error.cfm
Attachments:
Comments: