#2565 √ resolved
euromark

CakeResponse is missing ICalendar and not responding as documented

Reported by euromark | February 11th, 2012 @ 07:55 AM | in 2.0.7 (closed)

What I did

I was wondering why CakeResponse is not working for specific extensions (like ics, ical) whereas pdf etc work perfect.

What happened

The controller does recognize the extension ('ext'=>'ics') but nothing of the file serving process gets triggered.
Seems like
a) none of the iCalender extensions are in the $_mimeTypes list

'ics' => 'text/calendar',

@see http://de.wikipedia.org/wiki/ICalendar

b) even if it is an unknown extension it should trigger the process - searching the template in the /extension/ subfolder as well as including the /Layouts/extension/default.ctp. After all, we whitelisted the extensions in Router::parseExtensions('ics', ...);
It should then silently fall back to "application/octet-stream" etc.

And the documentation for Router::parseExtensions() states the expected behavior:

 * The file extension itself is made available in the controller as
 * $this->params['url']['ext'], and is used by the RequestHandler component to
 * automatically switch to alternate layouts and templates, and load helpers
 * corresponding to the given content, i.e. RssHelper.

Or does not state that unknown file extensions cannot be handled automatically.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Source available from github

Repository is at http://github.com/cakephp/cakephp

Creating a bug report

When creating a bug report, please include as much relevant information as possible. Please include code to reproduce the issue. Or even better, make a unit test. Either change an existing test or add a new test to show that the expected behavior is not occuring.

People watching this ticket