Ticket #131 (new defect)

Opened 2 months ago

Missing [type for the default format] + [exception rules] in Solar_Controller_Page

Reported by: umka.dk@gmail.com Assigned to: pmjones
Priority: minor Component: code
Keywords: Solar_Controller_Page, _format_type Cc:

Description

Been trying to get my head around controller's "_formar" use and noticed a couple of issues with the way Solar_Controller_Page handles formats.

Firstly, by default $_format_default is set to "xhtml", however default $_format_type array does not have an "xhtml" key, ie the following entry is missing from the $_format_type: 'xhtml' => 'application/xhtml+xml'.

Secondly, I realise that the default behaviour for Solar is to ignore layout if a specific format has been requested and I can see why this is done, however I've also noticed that "php" is the only exception from this rule. It would be very handy if in the interests of maintaining expected behaviour this exception list could be expanded to include "xhtml", "html" and "htm" formats.

The reason I mention this is because on one hand, I can't think of a possible scenario where ignoring layout when specifically requesting one of this formats would be an advantage. On the other hand, the ability to serve a full page (Layout + View) while controlling the value of Content-Type header by defining current format would allow us to get around a current limitation in IE where it does not consider "application/xhtml+xml" to be a valid mime type.

In other words, if this fix was applied then a valid XHTML 1.1 document could be served using 'application/xhtml+xml' mime type from http://my.domain.com/path/to/my/file.xhtml and the same valid XHTML 1.1 could also be accessed with 'text/html' mime type from http://my.domain.com/path/to/my/file.html

Attachments


Add/Change #131 (Missing [type for the default format] + [exception rules] in Solar_Controller_Page)