I was able to write a test to prove this. the second test does not pass.
$c->response->body('<!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0
Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd>');
  $c->finalize;
  like( $c->response->body, qr/^<\!D/, 'correct doctype - no error' );

    $c->stash->{error} = "error, oh my!";
    $c->response->body('<!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0
Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd>');
    $c->finalize;
    like( $c->response->body, qr/^<\!D/, 'correct doctype - with error' );

On Fri, Apr 18, 2008 at 3:40 PM, J. G. Konrad <[EMAIL PROTECTED]> wrote:

> Any thoughs on why or how the doctype would be commented out?
> In C::Root::end() the doctype in the response body looks like
>
> <!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
> http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd>
>
> but in $c->finalize  the doctype has been commented out
>
> <!--DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
> http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd-->
>
> This does not happen on every request. Only on requests that have an
> 'error'. The error are something simple like the incorrect password while
> trying to login.  There is a message placed in the 'error' key in the stash.
>
> Thanks,
>   jk
>
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to