Skip to content
Snippets Groups Projects
Commit 35bfcd1d authored by Guillaume ROUSSE's avatar Guillaume ROUSSE
Browse files

handle headers from perl code, not templates

parent 78387890
No related branches found
No related tags found
No related merge requests found
......@@ -164,6 +164,11 @@ sub respond {
binmode(STDOUT, ":utf8");
print $self->{cgi}->header(
-type => 'text/html',
-charset => ''
);
unless ($tt2->process($template, $self->{out}, \*STDOUT)) {
printf "Content-type: text/plain\n\n Error: %s", $tt2->error();
$self->{logger}->errorf("Web parser error : %s", $tt2->error());
......
......@@ -23,7 +23,7 @@ subtest start_page => sub {
diag($out) if $ENV{TEST_DEBUG};
like(
$out,
qr{^Content-Type: text/html\n\n},
qr{^Content-Type: text/html\r\n\r\n},
'HTTP headers'
);
like(
......@@ -50,7 +50,7 @@ subtest sp_selection_page => sub {
diag($out) if $ENV{TEST_DEBUG};
like(
$out,
qr{^Content-Type: text/html\n\n},
qr{^Content-Type: text/html\r\n\r\n},
'HTTP headers'
);
like(
......
Content-Type: text/html
[% IF cookie %]Set-Cookie: [% cookie %][% END %]
<?xml version="1.0" encoding="utf-8" ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/x
html1/DTD/xhtml1-transitional.dtd">
......
Content-Type: text/html
[% IF cookie %]Set-Cookie: [% cookie %][% END %]
<?xml version="1.0" encoding="utf-8" ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/x
html1/DTD/xhtml1-transitional.dtd">
<html xml:lang="[% iso639 = locale.match('^(.)(.)'); iso639.0; iso639.1 %]" xmlns="http://www.w3.org/1999/xhtml">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment