[Catalyst] Re: doctype being modified

J.G.Konrad konradjg at gmail.com
Sat Apr 19 00:37:27 BST 2008


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} =3D "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 <konradjg at gmail.com> 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 sta=
sh.
>
> Thanks,
>   jk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20080418/0b0b7=
135/attachment.htm


More information about the Catalyst mailing list