--- test/html-webhacc/cc.cgi 2007/11/05 09:33:52 1.23
+++ test/html-webhacc/cc.cgi 2007/11/18 05:30:03 1.25
@@ -62,7 +62,12 @@
Request URI
<@{[htescape $input->{request_uri}]}>
Document URI
- <@{[htescape $input->{uri}]}>
+ <@{[htescape $input->{uri}]}>
+
]; # no yet
push @nav, ['#document-info' => 'Information'];
@@ -74,7 +79,7 @@
<@{[htescape $input->{base_uri}]}>
Internet Media Type
@{[htescape $input->{media_type}]}
- @{[$input->{media_type_overridden} ? '(overridden)' : '']}
+ @{[$input->{media_type_overridden} ? '(overridden)' : defined $input->{official_type} ? $input->{media_type} eq $input->{official_type} ? '' : '(sniffed; official type is: '.htescape ($input->{official_type}).'
)' : '(sniffed)']}
Character Encoding
@{[defined $input->{charset} ? ''.htescape ($input->{charset}).'
' : '(none)']}
@{[$input->{charset_overridden} ? '(overridden)' : '']}
@@ -93,7 +98,8 @@
if ($input->{media_type} eq 'text/html') {
($doc, $el) = print_syntax_error_html_section ($input, $result);
- print_source_string_section (\($input->{s}), $input->{charset});
+ print_source_string_section
+ (\($input->{s}), $input->{charset} || $doc->input_encoding);
} elsif ({
'text/xml' => 1,
'application/atom+xml' => 1,
@@ -110,7 +116,7 @@
print_source_string_section (\($input->{s}), 'utf-8');
} else {
## TODO: Change HTTP status code??
- print_result_unknown_type_section ($input);
+ print_result_unknown_type_section ($input, $result);
}
if (defined $doc or defined $el) {
@@ -143,7 +149,8 @@