Ticket #352 (new enhancement)
proper http response codes on missing template handler / exception handler
| Reported by: | SirRawlins | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.2 |
| Version: | 3.0.178 | Severity: | normal |
| Keywords: | Cc: |
Description
I'd like to make a feature suggestion to have the framework return the correct http response codes 404/500 when a missing event is requested or an exception is thrown.
Under normal circumstances of someone trying to access a resource that doesn't exist like /something.cfm or if a standard coldfusion application exception occurs and is not caught then the http response codes are given back.
As the framework overrides these features, catching and outputting exceptions or displaying a nice message when a missing event is requested it should probably provide HTTP response codes. There is also a 201 code for when the requests in content being generated, this could perhaps be returned when the framework is generating new events from the URL?
I'm thinking that this just a best practice thing, if you've inadvertently placed a broken link within the application then at present Google would index your missing template or exception pages which doesn't look very good, at least with the response codes this would be avoided.
I've implemented this myself on a local application simply by placing cfheaders in the views for the exception and missing event handlers although it'd likely be better placed within the framework itself?
I'd be interested to hear you thoughts on this,
Rob.
![(please configure the [header_logo] section in trac.ini)](/ModelGlue.com/trac.cgi/chrome/site/your_project_logo.png)