--- trunk/lib/Frey/Web.pm 2008/11/19 03:11:11 446 +++ trunk/lib/Frey/Web.pm 2008/11/19 03:36:24 448 @@ -43,6 +43,12 @@ }, ); +has 'content_type' => ( + is => 'rw', + isa => 'Str', + default => 'text/html', +); + =head2 inline_smaller_than Inline JavaScript and CSS smaller than this size into page reducing @@ -162,15 +168,19 @@ my $url = $self->request_url; $url =~ s{\?reload=\d+}{}; + my $body = $a->{body} || $self->markup; + return $body if $self->content_type !~ m{html}; + $body ||= ''; + my $html = join("\n", qq||, $self->_head_html, '' . ( $self->title || $a->{title} || ref($self) ) . '', '', ( $a->{head} || '' ), - '', - ( $a->{body} || $self->markup || '' ), qq| + + $body
Frey $Frey::VERSION $url